16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
21 template<
typename T>
class SwigValueWrapper {
22 struct SwigMovePointer {
24 SwigMovePointer(T *p) : ptr(p) { }
25 ~SwigMovePointer() {
delete ptr; }
26 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0;
delete oldptr; ptr = rhs.ptr; rhs.ptr = 0;
return *
this; }
28 SwigValueWrapper& operator=(
const SwigValueWrapper<T>& rhs);
29 SwigValueWrapper(
const SwigValueWrapper<T>& rhs);
31 SwigValueWrapper() : pointer(0) { }
32 SwigValueWrapper& operator=(
const T& t) { SwigMovePointer tmp(
new T(t)); pointer = tmp;
return *
this; }
33 operator T&()
const {
return *pointer.ptr; }
34 T *operator&() {
return pointer.ptr; }
37 template <
typename T> T SwigValueInit() {
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
54 # define SWIGTEMPLATEDISAMBIGUATOR template
56 # define SWIGTEMPLATEDISAMBIGUATOR
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
78 # define SWIGUNUSED __attribute__ ((__unused__))
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505)
90 #ifndef SWIGUNUSEDPARM
92 # define SWIGUNUSEDPARM(p)
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
100 # define SWIGINTERN static SWIGUNUSED
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
122 # define SWIGEXPORT __declspec(dllexport)
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
167 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
185 #define SWIG_RUNTIME_VERSION "4"
188 #ifdef SWIG_TYPE_TABLE
189 # define SWIG_QUOTE_STRING(x) #x
190 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
191 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
193 # define SWIG_TYPE_TABLE_NAME
206 # define SWIGRUNTIME SWIGINTERN
209 #ifndef SWIGRUNTIMEINLINE
210 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
214 #ifndef SWIG_BUFFER_SIZE
215 # define SWIG_BUFFER_SIZE 1024
219 #define SWIG_POINTER_DISOWN 0x1
220 #define SWIG_CAST_NEW_MEMORY 0x2
223 #define SWIG_POINTER_OWN 0x1
306 #define SWIG_ERROR (-1)
307 #define SWIG_IsOK(r) (r >= 0)
308 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
311 #define SWIG_CASTRANKLIMIT (1 << 8)
313 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
315 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
317 #define SWIG_BADOBJ (SWIG_ERROR)
318 #define SWIG_OLDOBJ (SWIG_OK)
319 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
320 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
322 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
323 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
324 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
325 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
326 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
327 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
330 #if defined(SWIG_CASTRANK_MODE)
331 # ifndef SWIG_TypeRank
332 # define SWIG_TypeRank unsigned long
334 # ifndef SWIG_MAXCASTRANK
335 # define SWIG_MAXCASTRANK (2)
337 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
338 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
339 SWIGINTERNINLINE
int SWIG_AddCast(
int r) {
340 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
342 SWIGINTERNINLINE
int SWIG_CheckState(
int r) {
343 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
346 # define SWIG_AddCast(r) (r)
347 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
357 typedef void *(*swig_converter_func)(
void *,
int *);
364 swig_dycast_func dcast;
373 swig_converter_func converter;
398 SWIG_TypeNameComp(
const char *f1,
const char *l1,
399 const char *f2,
const char *l2) {
400 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
401 while ((*f1 ==
' ') && (f1 != l1)) ++f1;
402 while ((*f2 ==
' ') && (f2 != l2)) ++f2;
403 if (*f1 != *f2)
return (*f1 > *f2) ? 1 : -1;
405 return (
int)((l1 - f1) - (l2 - f2));
413 SWIG_TypeCmp(
const char *nb,
const char *tb) {
415 const char* te = tb + strlen(tb);
417 while (equiv != 0 && *ne) {
418 for (nb = ne; *ne; ++ne) {
419 if (*ne ==
'|')
break;
421 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
432 SWIG_TypeEquiv(
const char *nb,
const char *tb) {
433 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
444 if (strcmp(iter->type->name, c) == 0) {
445 if (iter == ty->cast)
448 iter->prev->next = iter->next;
450 iter->next->prev = iter->prev;
451 iter->next = ty->cast;
453 if (ty->cast) ty->cast->prev = iter;
471 if (iter->type == from) {
472 if (iter == ty->cast)
475 iter->prev->next = iter->next;
477 iter->next->prev = iter->prev;
478 iter->next = ty->cast;
480 if (ty->cast) ty->cast->prev = iter;
493 SWIGRUNTIMEINLINE
void *
495 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
504 if (!ty || !ty->dcast)
return ty;
505 while (ty && (ty->dcast)) {
506 ty = (*ty->dcast)(ptr);
515 SWIGRUNTIMEINLINE
const char *
524 SWIGRUNTIME
const char *
530 if (!type)
return NULL;
531 if (type->str != NULL) {
532 const char *last_name = type->str;
534 for (s = type->str; *s; s++)
535 if (*s ==
'|') last_name = s+1;
549 ti->clientdata = clientdata;
552 if (!cast->converter) {
554 if (!tc->clientdata) {
555 SWIG_TypeClientData(tc, clientdata);
563 SWIG_TypeClientData(ti, clientdata);
583 size_t r = iter->size - 1;
586 size_t i = (l + r) >> 1;
587 const char *iname = iter->types[i]->name;
589 int compare = strcmp(name, iname);
591 return iter->types[i];
592 }
else if (compare < 0) {
598 }
else if (compare > 0) {
607 }
while (iter != end);
625 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 for (; i < iter->size; ++i) {
635 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
636 return iter->types[i];
639 }
while (iter != end);
650 SWIG_PackData(
char *c,
void *ptr,
size_t sz) {
651 static const char hex[17] =
"0123456789abcdef";
652 const unsigned char *u = (
unsigned char *) ptr;
653 const unsigned char *eu = u + sz;
654 for (; u != eu; ++u) {
655 unsigned char uu = *u;
656 *(c++) = hex[(uu & 0xf0) >> 4];
657 *(c++) = hex[uu & 0xf];
665 SWIGRUNTIME
const char *
666 SWIG_UnpackData(
const char *c,
void *ptr,
size_t sz) {
667 unsigned char *u = (
unsigned char *) ptr;
668 const unsigned char *eu = u + sz;
669 for (; u != eu; ++u) {
672 if ((d >=
'0') && (d <=
'9'))
673 uu = (
unsigned char)((d -
'0') << 4);
674 else if ((d >=
'a') && (d <=
'f'))
675 uu = (
unsigned char)((d - (
'a'-10)) << 4);
679 if ((d >=
'0') && (d <=
'9'))
680 uu |= (
unsigned char)(d -
'0');
681 else if ((d >=
'a') && (d <=
'f'))
682 uu |= (
unsigned char)(d - (
'a'-10));
694 SWIG_PackVoidPtr(
char *buff,
void *ptr,
const char *name,
size_t bsz) {
696 if ((2*
sizeof(
void *) + 2) > bsz)
return 0;
698 r = SWIG_PackData(r,&ptr,
sizeof(
void *));
699 if (strlen(name) + 1 > (bsz - (r - buff)))
return 0;
704 SWIGRUNTIME
const char *
705 SWIG_UnpackVoidPtr(
const char *c,
void **ptr,
const char *name) {
707 if (strcmp(c,
"NULL") == 0) {
714 return SWIG_UnpackData(++c,ptr,
sizeof(
void *));
718 SWIG_PackDataName(
char *buff,
void *ptr,
size_t sz,
const char *name,
size_t bsz) {
720 size_t lname = (name ? strlen(name) : 0);
721 if ((2*sz + 2 + lname) > bsz)
return 0;
723 r = SWIG_PackData(r,ptr,sz);
725 strncpy(r,name,lname+1);
732 SWIGRUNTIME
const char *
733 SWIG_UnpackDataName(
const char *c,
void *ptr,
size_t sz,
const char *name) {
735 if (strcmp(c,
"NULL") == 0) {
742 return SWIG_UnpackData(++c,ptr,sz);
750 #define SWIG_UnknownError -1
751 #define SWIG_IOError -2
752 #define SWIG_RuntimeError -3
753 #define SWIG_IndexError -4
754 #define SWIG_TypeError -5
755 #define SWIG_DivisionByZero -6
756 #define SWIG_OverflowError -7
757 #define SWIG_SyntaxError -8
758 #define SWIG_ValueError -9
759 #define SWIG_SystemError -10
760 #define SWIG_AttributeError -11
761 #define SWIG_MemoryError -12
762 #define SWIG_NullReferenceError -13
767 #if PY_VERSION_HEX >= 0x03000000
769 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
770 #define PyInt_Check(x) PyLong_Check(x)
771 #define PyInt_AsLong(x) PyLong_AsLong(x)
772 #define PyInt_FromLong(x) PyLong_FromLong(x)
773 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
774 #define PyString_Check(name) PyBytes_Check(name)
775 #define PyString_FromString(x) PyUnicode_FromString(x)
776 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
777 #define PyString_AsString(str) PyBytes_AsString(str)
778 #define PyString_Size(str) PyBytes_Size(str)
779 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
780 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
781 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
782 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
787 # define Py_TYPE(op) ((op)->ob_type)
792 #if PY_VERSION_HEX >= 0x03000000
793 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
795 # define SWIG_Python_str_FromFormat PyString_FromFormat
803 SWIG_Python_str_AsChar(PyObject *str)
805 #if PY_VERSION_HEX >= 0x03000000
809 str = PyUnicode_AsUTF8String(str);
810 PyBytes_AsStringAndSize(str, &cstr, &len);
811 newstr = (
char *) malloc(len+1);
812 memcpy(newstr, cstr, len+1);
816 return PyString_AsString(str);
820 #if PY_VERSION_HEX >= 0x03000000
821 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
823 # define SWIG_Python_str_DelForPy3(x)
828 SWIG_Python_str_FromChar(
const char *c)
830 #if PY_VERSION_HEX >= 0x03000000
831 return PyUnicode_FromString(c);
833 return PyString_FromString(c);
838 #if PY_VERSION_HEX < 0x02020000
839 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
840 # define PyOS_snprintf _snprintf
842 # define PyOS_snprintf snprintf
847 #if PY_VERSION_HEX < 0x02020000
849 #ifndef SWIG_PYBUFFER_SIZE
850 # define SWIG_PYBUFFER_SIZE 1024
854 PyString_FromFormat(
const char *fmt, ...) {
856 char buf[SWIG_PYBUFFER_SIZE * 2];
859 res = vsnprintf(buf,
sizeof(buf), fmt, ap);
861 return (res < 0 || res >= (
int)
sizeof(buf)) ? 0 : PyString_FromString(buf);
866 # define PyObject_DEL PyObject_Del
870 #if PY_VERSION_HEX < 0x02020000
871 # ifndef PyExc_StopIteration
872 # define PyExc_StopIteration PyExc_RuntimeError
874 # ifndef PyObject_GenericGetAttr
875 # define PyObject_GenericGetAttr 0
880 #if PY_VERSION_HEX < 0x02010000
881 # ifndef Py_NotImplemented
882 # define Py_NotImplemented PyExc_RuntimeError
887 #if PY_VERSION_HEX < 0x02010000
888 # ifndef PyString_AsStringAndSize
889 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
894 #if PY_VERSION_HEX < 0x02000000
895 # ifndef PySequence_Size
896 # define PySequence_Size PySequence_Length
901 #if PY_VERSION_HEX < 0x02030000
903 PyObject *PyBool_FromLong(
long ok)
905 PyObject *result = ok ? Py_True : Py_False;
914 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
915 typedef int Py_ssize_t;
916 # define PY_SSIZE_T_MAX INT_MAX
917 # define PY_SSIZE_T_MIN INT_MIN
918 typedef inquiry lenfunc;
919 typedef intargfunc ssizeargfunc;
920 typedef intintargfunc ssizessizeargfunc;
921 typedef intobjargproc ssizeobjargproc;
922 typedef intintobjargproc ssizessizeobjargproc;
923 typedef getreadbufferproc readbufferproc;
924 typedef getwritebufferproc writebufferproc;
925 typedef getsegcountproc segcountproc;
926 typedef getcharbufferproc charbufferproc;
927 static long PyNumber_AsSsize_t (PyObject *x,
void *SWIGUNUSEDPARM(exc))
930 PyObject *i = PyNumber_Int(x);
932 result = PyInt_AsLong(i);
939 #if PY_VERSION_HEX < 0x02050000
940 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
943 #if PY_VERSION_HEX < 0x02040000
944 #define Py_VISIT(op) \
947 int vret = visit((op), arg); \
954 #if PY_VERSION_HEX < 0x02030000
957 PyNumberMethods as_number;
958 PyMappingMethods as_mapping;
959 PySequenceMethods as_sequence;
960 PyBufferProcs as_buffer;
961 PyObject *name, *slots;
965 #if PY_VERSION_HEX < 0x02030000
966 typedef destructor freefunc;
969 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
970 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
971 (PY_MAJOR_VERSION > 3))
972 # define SWIGPY_USE_CAPSULE
973 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
976 #if PY_VERSION_HEX < 0x03020000
977 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
978 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
979 #define Py_hash_t long
986 SWIGRUNTIME PyObject*
987 SWIG_Python_ErrorType(
int code) {
990 case SWIG_MemoryError:
991 type = PyExc_MemoryError;
994 type = PyExc_IOError;
996 case SWIG_RuntimeError:
997 type = PyExc_RuntimeError;
999 case SWIG_IndexError:
1000 type = PyExc_IndexError;
1002 case SWIG_TypeError:
1003 type = PyExc_TypeError;
1005 case SWIG_DivisionByZero:
1006 type = PyExc_ZeroDivisionError;
1008 case SWIG_OverflowError:
1009 type = PyExc_OverflowError;
1011 case SWIG_SyntaxError:
1012 type = PyExc_SyntaxError;
1014 case SWIG_ValueError:
1015 type = PyExc_ValueError;
1017 case SWIG_SystemError:
1018 type = PyExc_SystemError;
1020 case SWIG_AttributeError:
1021 type = PyExc_AttributeError;
1024 type = PyExc_RuntimeError;
1031 SWIG_Python_AddErrorMsg(
const char* mesg)
1034 PyObject *value = 0;
1035 PyObject *traceback = 0;
1037 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1040 PyObject *old_str = PyObject_Str(value);
1044 PyErr_Format(type,
"%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1045 SWIG_Python_str_DelForPy3(tmp);
1049 PyErr_SetString(PyExc_RuntimeError, mesg);
1053 #if defined(SWIG_PYTHON_NO_THREADS)
1054 # if defined(SWIG_PYTHON_THREADS)
1055 # undef SWIG_PYTHON_THREADS
1058 #if defined(SWIG_PYTHON_THREADS)
1059 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1060 # if (PY_VERSION_HEX >= 0x02030000)
1061 # define SWIG_PYTHON_USE_GIL
1064 # if defined(SWIG_PYTHON_USE_GIL)
1065 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1066 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1069 class SWIG_Python_Thread_Block {
1071 PyGILState_STATE state;
1073 void end() {
if (status) { PyGILState_Release(state); status =
false;} }
1074 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1075 ~SWIG_Python_Thread_Block() { end(); }
1077 class SWIG_Python_Thread_Allow {
1079 PyThreadState *save;
1081 void end() {
if (status) { PyEval_RestoreThread(save); status =
false; }}
1082 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1083 ~SWIG_Python_Thread_Allow() { end(); }
1085 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1086 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1087 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1088 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1090 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1091 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1092 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1093 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1096 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1097 # define SWIG_PYTHON_INITIALIZE_THREADS
1099 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1100 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1102 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1103 # define SWIG_PYTHON_THREAD_END_BLOCK
1105 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1106 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1108 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1109 # define SWIG_PYTHON_THREAD_END_ALLOW
1113 # define SWIG_PYTHON_INITIALIZE_THREADS
1114 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1115 # define SWIG_PYTHON_THREAD_END_BLOCK
1116 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1117 # define SWIG_PYTHON_THREAD_END_ALLOW
1133 #define SWIG_PY_POINTER 4
1134 #define SWIG_PY_BINARY 5
1151 #if PY_VERSION_HEX >= 0x03000000
1152 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(
self), PyObject *func)
1154 return PyInstanceMethod_New(func);
1157 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(
self), PyObject *SWIGUNUSEDPARM(func))
1180 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1181 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1182 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1184 #ifdef SWIGPYTHON_BUILTIN
1185 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1187 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1190 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1192 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1193 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1194 #define swig_owntype int
1197 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1198 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1201 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1202 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1205 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1206 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1209 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1210 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1215 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1216 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1217 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1219 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1220 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1221 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1222 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1223 #define SWIG_fail goto fail
1231 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1232 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1233 PyErr_SetObject(errtype, obj);
1235 SWIG_PYTHON_THREAD_END_BLOCK;
1239 SWIG_Python_SetErrorMsg(PyObject *errtype,
const char *msg) {
1240 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1241 PyErr_SetString(errtype, msg);
1242 SWIG_PYTHON_THREAD_END_BLOCK;
1245 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1249 #if defined(SWIGPYTHON_BUILTIN)
1252 SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1253 PyObject *s = PyString_InternFromString(key);
1254 PyList_Append(seq, s);
1259 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface,
const char *name, PyObject *obj) {
1260 #if PY_VERSION_HEX < 0x02030000
1261 PyDict_SetItemString(d, (
char *)name, obj);
1263 PyDict_SetItemString(d, name, obj);
1266 if (public_interface)
1267 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1273 SWIG_Python_SetConstant(PyObject *d,
const char *name, PyObject *obj) {
1274 #if PY_VERSION_HEX < 0x02030000
1275 PyDict_SetItemString(d, (
char *)name, obj);
1277 PyDict_SetItemString(d, name, obj);
1286 SWIGINTERN PyObject*
1287 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1288 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1291 }
else if (result == Py_None) {
1295 if (!PyList_Check(result)) {
1296 PyObject *o2 = result;
1297 result = PyList_New(1);
1298 PyList_SetItem(result, 0, o2);
1300 PyList_Append(result,obj);
1309 }
else if (result == Py_None) {
1313 if (!PyTuple_Check(result)) {
1315 result = PyTuple_New(1);
1316 PyTuple_SET_ITEM(result, 0, o2);
1318 o3 = PyTuple_New(1);
1319 PyTuple_SET_ITEM(o3, 0, obj);
1321 result = PySequence_Concat(o2, o3);
1331 SWIGINTERN Py_ssize_t
1332 SWIG_Python_UnpackTuple(PyObject *args,
const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1338 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1339 name, (min == max ?
"" :
"at least "), (
int)min);
1343 if (!PyTuple_Check(args)) {
1344 if (min <= 1 && max >= 1) {
1347 for (i = 1; i < max; ++i) {
1352 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1355 Py_ssize_t l = PyTuple_GET_SIZE(args);
1357 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1358 name, (min == max ?
"" :
"at least "), (
int)min, (
int)l);
1360 }
else if (l > max) {
1361 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1362 name, (min == max ?
"" :
"at most "), (
int)max, (
int)l);
1366 for (i = 0; i < l; ++i) {
1367 objs[i] = PyTuple_GET_ITEM(args, i);
1369 for (; l < max; ++l) {
1378 #if PY_VERSION_HEX >= 0x02020000
1379 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1381 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1389 #define SWIG_STATIC_POINTER(var) var
1391 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1399 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1400 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1402 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1404 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1405 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1412 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1413 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1414 # ifndef SWIG_PYTHON_BUILD_NONE
1415 # define SWIG_PYTHON_BUILD_NONE
1420 #ifdef SWIG_PYTHON_BUILD_NONE
1423 # define Py_None SWIG_Py_None()
1425 SWIGRUNTIMEINLINE PyObject *
1428 PyObject *none = Py_BuildValue((
char*)
"");
1432 SWIGRUNTIME PyObject *
1435 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1442 SWIGRUNTIMEINLINE PyObject *
1445 PyObject *none = Py_None;
1459 PyTypeObject *pytype;
1462 SWIGRUNTIMEINLINE
int
1466 return data ? data->implicitconv : 0;
1469 SWIGRUNTIMEINLINE PyObject *
1472 PyObject *klass = data ? data->klass : 0;
1473 return (klass ? klass : PyExc_RuntimeError);
1478 SwigPyClientData_New(PyObject* obj)
1486 Py_INCREF(data->klass);
1488 if (PyClass_Check(obj)) {
1490 data->newargs = obj;
1493 #if (PY_VERSION_HEX < 0x02020000)
1496 data->newraw = PyObject_GetAttrString(data->klass, (
char *)
"__new__");
1499 Py_INCREF(data->newraw);
1500 data->newargs = PyTuple_New(1);
1501 PyTuple_SetItem(data->newargs, 0, obj);
1503 data->newargs = obj;
1505 Py_INCREF(data->newargs);
1508 data->destroy = PyObject_GetAttrString(data->klass, (
char *)
"__swig_destroy__");
1509 if (PyErr_Occurred()) {
1513 if (data->destroy) {
1515 Py_INCREF(data->destroy);
1516 flags = PyCFunction_GET_FLAGS(data->destroy);
1518 data->delargs = !(flags & (METH_O));
1525 data->implicitconv = 0;
1533 Py_XDECREF(data->newraw);
1534 Py_XDECREF(data->newargs);
1535 Py_XDECREF(data->destroy);
1546 #ifdef SWIGPYTHON_BUILTIN
1552 #ifdef SWIGPYTHON_BUILTIN
1554 SWIGRUNTIME PyObject *
1555 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1560 sobj->dict = PyDict_New();
1562 Py_INCREF(sobj->dict);
1568 SWIGRUNTIME PyObject *
1571 return PyLong_FromVoidPtr(v->ptr);
1574 SWIGRUNTIME PyObject *
1577 PyObject *res = NULL;
1578 PyObject *args = PyTuple_New(1);
1580 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1581 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1583 #if PY_VERSION_HEX >= 0x03000000
1584 res = PyUnicode_Format(ofmt,args);
1586 res = PyString_Format(ofmt,args);
1596 SWIGRUNTIME PyObject *
1599 return SwigPyObject_format(
"%o",v);
1602 SWIGRUNTIME PyObject *
1605 return SwigPyObject_format(
"%x",v);
1608 SWIGRUNTIME PyObject *
1615 const char *name = SWIG_TypePrettyName(v->ty);
1616 PyObject *repr = SWIG_Python_str_FromFormat(
"<Swig Object of type '%s' at %p>", (name ? name :
"unknown"), (
void *)v);
1619 PyObject *nrep = SwigPyObject_repr((
SwigPyObject *)v->next);
1621 PyObject *nrep = SwigPyObject_repr((
SwigPyObject *)v->next, args);
1623 # if PY_VERSION_HEX >= 0x03000000
1624 PyObject *joined = PyUnicode_Concat(repr, nrep);
1629 PyString_ConcatAndDel(&repr,nrep);
1640 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1644 SWIGRUNTIME PyObject*
1648 if( op != Py_EQ && op != Py_NE ) {
1649 Py_INCREF(Py_NotImplemented);
1650 return Py_NotImplemented;
1652 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1657 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(
void);
1659 #ifdef SWIGPYTHON_BUILTIN
1661 SWIGRUNTIME PyTypeObject*
1662 SwigPyObject_type(
void) {
1664 assert(SwigPyObject_stype);
1671 SWIGRUNTIME PyTypeObject*
1672 SwigPyObject_type(
void) {
1673 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1678 SWIGRUNTIMEINLINE
int
1679 SwigPyObject_Check(PyObject *op) {
1680 #ifdef SWIGPYTHON_BUILTIN
1681 PyTypeObject *target_tp = SwigPyObject_type();
1682 if (PyType_IsSubtype(op->ob_type, target_tp))
1684 return (strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1686 return (Py_TYPE(op) == SwigPyObject_type())
1687 || (strcmp(Py_TYPE(op)->tp_name,
"SwigPyObject") == 0);
1691 SWIGRUNTIME PyObject *
1695 SwigPyObject_dealloc(PyObject *v)
1698 PyObject *next = sobj->next;
1699 if (sobj->own == SWIG_POINTER_OWN) {
1702 PyObject *destroy = data ? data->destroy : 0;
1714 PyObject *val = NULL, *type = NULL, *tb = NULL;
1715 PyErr_Fetch(&val, &type, &tb);
1717 if (data->delargs) {
1719 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1720 res = SWIG_Python_CallFunctor(destroy, tmp);
1723 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1724 PyObject *mself = PyCFunction_GET_SELF(destroy);
1725 res = ((*meth)(mself, v));
1728 PyErr_WriteUnraisable(destroy);
1730 PyErr_Restore(val, type, tb);
1734 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1736 const char *name = SWIG_TypePrettyName(ty);
1737 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name :
"unknown"));
1745 SWIGRUNTIME PyObject*
1746 SwigPyObject_append(PyObject* v, PyObject* next)
1751 if (!PyArg_ParseTuple(next,(
char *)
"O:append", &tmp))
return NULL;
1754 if (!SwigPyObject_Check(next)) {
1755 PyErr_SetString(PyExc_TypeError,
"Attempt to append a non SwigPyObject");
1760 return SWIG_Py_Void();
1763 SWIGRUNTIME PyObject*
1765 SwigPyObject_next(PyObject* v)
1767 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1772 Py_INCREF(sobj->next);
1775 return SWIG_Py_Void();
1779 SWIGINTERN PyObject*
1781 SwigPyObject_disown(PyObject *v)
1783 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1788 return SWIG_Py_Void();
1791 SWIGINTERN PyObject*
1793 SwigPyObject_acquire(PyObject *v)
1795 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1799 sobj->own = SWIG_POINTER_OWN;
1800 return SWIG_Py_Void();
1803 SWIGINTERN PyObject*
1804 SwigPyObject_own(PyObject *v, PyObject *args)
1807 #if (PY_VERSION_HEX < 0x02020000)
1808 if (!PyArg_ParseTuple(args,(
char *)
"|O:own",&val))
1809 #elif (PY_VERSION_HEX < 0x02050000)
1810 if (!PyArg_UnpackTuple(args, (
char *)
"own", 0, 1, &val))
1812 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val))
1820 PyObject *obj = PyBool_FromLong(sobj->own);
1823 if (PyObject_IsTrue(val)) {
1824 SwigPyObject_acquire(v);
1826 SwigPyObject_disown(v);
1829 if (PyObject_IsTrue(val)) {
1830 SwigPyObject_acquire(v,args);
1832 SwigPyObject_disown(v,args);
1842 swigobject_methods[] = {
1843 {(
char *)
"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (
char *)
"releases ownership of the pointer"},
1844 {(
char *)
"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (
char *)
"acquires ownership of the pointer"},
1845 {(
char *)
"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1846 {(
char *)
"append", (PyCFunction)SwigPyObject_append, METH_O, (
char *)
"appends another 'this' object"},
1847 {(
char *)
"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (
char *)
"returns the next 'this' object"},
1848 {(
char *)
"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (
char *)
"returns object representation"},
1853 swigobject_methods[] = {
1854 {(
char *)
"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (
char *)
"releases ownership of the pointer"},
1855 {(
char *)
"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (
char *)
"acquires ownership of the pointer"},
1856 {(
char *)
"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1857 {(
char *)
"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (
char *)
"appends another 'this' object"},
1858 {(
char *)
"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (
char *)
"returns the next 'this' object"},
1859 {(
char *)
"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (
char *)
"returns object representation"},
1864 #if PY_VERSION_HEX < 0x02020000
1865 SWIGINTERN PyObject *
1868 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1872 SWIGRUNTIME PyTypeObject*
1873 SwigPyObject_TypeOnce(
void) {
1874 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1876 static PyNumberMethods SwigPyObject_as_number = {
1881 #
if PY_VERSION_HEX < 0x03000000
1897 #
if PY_VERSION_HEX < 0x03000000
1900 (unaryfunc)SwigPyObject_long,
1901 #if PY_VERSION_HEX < 0x03000000
1902 (unaryfunc)SwigPyObject_long,
1907 #if PY_VERSION_HEX < 0x03000000
1908 (unaryfunc)SwigPyObject_oct,
1909 (unaryfunc)SwigPyObject_hex,
1911 #if PY_VERSION_HEX >= 0x03050000
1912 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1913 #elif PY_VERSION_HEX >= 0x03000000
1914 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1915 #elif PY_VERSION_HEX >= 0x02050000
1916 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1917 #elif PY_VERSION_HEX >= 0x02020000
1918 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1919 #elif PY_VERSION_HEX >= 0x02000000
1920 0,0,0,0,0,0,0,0,0,0,0
1924 static PyTypeObject swigpyobject_type;
1925 static int type_init = 0;
1927 const PyTypeObject tmp = {
1928 #if PY_VERSION_HEX >= 0x03000000
1929 PyVarObject_HEAD_INIT(NULL, 0)
1931 PyObject_HEAD_INIT(NULL)
1934 (
char *)
"SwigPyObject",
1937 (destructor)SwigPyObject_dealloc,
1939 #
if PY_VERSION_HEX < 0x02020000
1940 (getattrfunc)SwigPyObject_getattr,
1945 #if PY_VERSION_HEX >= 0x03000000
1948 (cmpfunc)SwigPyObject_compare,
1950 (reprfunc)SwigPyObject_repr,
1951 &SwigPyObject_as_number,
1957 PyObject_GenericGetAttr,
1964 (richcmpfunc)SwigPyObject_richcompare,
1966 #
if PY_VERSION_HEX >= 0x02020000
1988 #
if PY_VERSION_HEX >= 0x02030000
1991 #
if PY_VERSION_HEX >= 0x02060000
1994 #
if PY_VERSION_HEX >= 0x03040000
2001 #
if PY_VERSION_HEX >= 0x02050000
2007 swigpyobject_type = tmp;
2009 #if PY_VERSION_HEX < 0x02020000
2010 swigpyobject_type.ob_type = &PyType_Type;
2012 if (PyType_Ready(&swigpyobject_type) < 0)
2016 return &swigpyobject_type;
2019 SWIGRUNTIME PyObject *
2029 return (PyObject *)sobj;
2044 SwigPyPacked_print(
SwigPyPacked *v, FILE *fp,
int SWIGUNUSEDPARM(flags))
2046 char result[SWIG_BUFFER_SIZE];
2047 fputs(
"<Swig Packed ", fp);
2048 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))) {
2052 fputs(v->ty->name,fp);
2057 SWIGRUNTIME PyObject *
2060 char result[SWIG_BUFFER_SIZE];
2061 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))) {
2062 return SWIG_Python_str_FromFormat(
"<Swig Packed at %s%s>", result, v->ty->name);
2064 return SWIG_Python_str_FromFormat(
"<Swig Packed %s>", v->ty->name);
2068 SWIGRUNTIME PyObject *
2071 char result[SWIG_BUFFER_SIZE];
2072 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))){
2073 return SWIG_Python_str_FromFormat(
"%s%s", result, v->ty->name);
2075 return SWIG_Python_str_FromChar(v->ty->name);
2084 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2085 return s ? s : strncmp((
char *)v->pack, (
char *)w->pack, 2*v->size);
2088 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(
void);
2090 SWIGRUNTIME PyTypeObject*
2091 SwigPyPacked_type(
void) {
2092 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2096 SWIGRUNTIMEINLINE
int
2097 SwigPyPacked_Check(PyObject *op) {
2098 return ((op)->ob_type == SwigPyPacked_TypeOnce())
2099 || (strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
2103 SwigPyPacked_dealloc(PyObject *v)
2105 if (SwigPyPacked_Check(v)) {
2112 SWIGRUNTIME PyTypeObject*
2113 SwigPyPacked_TypeOnce(
void) {
2114 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
2115 static PyTypeObject swigpypacked_type;
2116 static int type_init = 0;
2118 const PyTypeObject tmp = {
2119 #if PY_VERSION_HEX>=0x03000000
2120 PyVarObject_HEAD_INIT(NULL, 0)
2122 PyObject_HEAD_INIT(NULL)
2125 (
char *)
"SwigPyPacked",
2128 (destructor)SwigPyPacked_dealloc,
2129 (printfunc)SwigPyPacked_print,
2132 #if PY_VERSION_HEX>=0x03000000
2135 (cmpfunc)SwigPyPacked_compare,
2137 (reprfunc)SwigPyPacked_repr,
2143 (reprfunc)SwigPyPacked_str,
2144 PyObject_GenericGetAttr,
2153 #
if PY_VERSION_HEX >= 0x02020000
2175 #
if PY_VERSION_HEX >= 0x02030000
2178 #
if PY_VERSION_HEX >= 0x02060000
2181 #
if PY_VERSION_HEX >= 0x03040000
2188 #
if PY_VERSION_HEX >= 0x02050000
2194 swigpypacked_type = tmp;
2196 #if PY_VERSION_HEX < 0x02020000
2197 swigpypacked_type.ob_type = &PyType_Type;
2199 if (PyType_Ready(&swigpypacked_type) < 0)
2203 return &swigpypacked_type;
2206 SWIGRUNTIME PyObject *
2211 void *pack = malloc(size);
2213 memcpy(pack, ptr, size);
2218 PyObject_DEL((PyObject *) sobj);
2222 return (PyObject *) sobj;
2226 SwigPyPacked_UnpackData(PyObject *obj,
void *ptr,
size_t size)
2228 if (SwigPyPacked_Check(obj)) {
2230 if (sobj->size != size)
return 0;
2231 memcpy(ptr, sobj->pack, size);
2242 SWIGRUNTIMEINLINE PyObject *
2245 return SWIG_Python_str_FromChar(
"this");
2248 static PyObject *swig_this = NULL;
2250 SWIGRUNTIME PyObject *
2253 if (swig_this == NULL)
2254 swig_this = _SWIG_This();
2261 #if PY_VERSION_HEX>=0x03000000
2262 #define SWIG_PYTHON_SLOW_GETSET_THIS
2266 SWIG_Python_GetSwigThis(PyObject *pyobj)
2270 if (SwigPyObject_Check(pyobj))
2273 #ifdef SWIGPYTHON_BUILTIN
2275 # ifdef PyWeakref_CheckProxy
2276 if (PyWeakref_CheckProxy(pyobj)) {
2277 pyobj = PyWeakref_GET_OBJECT(pyobj);
2278 if (pyobj && SwigPyObject_Check(pyobj))
2287 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2288 if (PyInstance_Check(pyobj)) {
2289 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2291 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2292 if (dictptr != NULL) {
2293 PyObject *dict = *dictptr;
2294 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2296 #ifdef PyWeakref_CheckProxy
2297 if (PyWeakref_CheckProxy(pyobj)) {
2298 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2299 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2302 obj = PyObject_GetAttr(pyobj,SWIG_This());
2306 if (PyErr_Occurred()) PyErr_Clear();
2312 obj = PyObject_GetAttr(pyobj,SWIG_This());
2316 if (PyErr_Occurred()) PyErr_Clear();
2320 if (obj && !SwigPyObject_Check(obj)) {
2323 return SWIG_Python_GetSwigThis(obj);
2332 SWIG_Python_AcquirePtr(PyObject *obj,
int own) {
2333 if (own == SWIG_POINTER_OWN) {
2336 int oldown = sobj->own;
2347 SWIG_Python_ConvertPtrAndOwn(PyObject *obj,
void **ptr,
swig_type_info *ty,
int flags,
int *own) {
2350 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2354 if (obj == Py_None && !implicit_conv) {
2362 sobj = SWIG_Python_GetSwigThis(obj);
2366 void *vptr = sobj->ptr;
2371 if (ptr) *ptr = vptr;
2380 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2381 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2384 *own = *own | SWIG_CAST_NEW_MEMORY;
2391 if (ptr) *ptr = vptr;
2397 *own = *own | sobj->own;
2398 if (flags & SWIG_POINTER_DISOWN) {
2403 if (implicit_conv) {
2405 if (data && !data->implicitconv) {
2406 PyObject *klass = data->klass;
2409 data->implicitconv = 1;
2410 impconv = SWIG_Python_CallFunctor(klass, obj);
2411 data->implicitconv = 0;
2412 if (PyErr_Occurred()) {
2420 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2421 if (SWIG_IsOK(res)) {
2426 res = SWIG_AddCast(res);
2427 res = SWIG_AddNewMask(res);
2429 res = SWIG_AddCast(res);
2438 if (!SWIG_IsOK(res) && obj == Py_None) {
2441 if (PyErr_Occurred())
2452 SWIG_Python_ConvertFunctionPtr(PyObject *obj,
void **ptr,
swig_type_info *ty) {
2453 if (!PyCFunction_Check(obj)) {
2454 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2459 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2460 const char *desc = doc ? strstr(doc,
"swig_ptr: ") : 0;
2462 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2469 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2484 SWIG_Python_ConvertPacked(PyObject *obj,
void *ptr,
size_t sz,
swig_type_info *ty) {
2486 if (!to)
return SWIG_ERROR;
2491 if (!tc)
return SWIG_ERROR;
2506 SWIGRUNTIME PyObject*
2509 #if (PY_VERSION_HEX >= 0x02020000)
2511 PyObject *newraw = data->newraw;
2513 inst = PyObject_Call(newraw, data->newargs, NULL);
2515 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2516 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2517 if (dictptr != NULL) {
2518 PyObject *dict = *dictptr;
2520 dict = PyDict_New();
2522 PyDict_SetItem(dict, SWIG_This(), swig_this);
2526 PyObject *key = SWIG_This();
2527 PyObject_SetAttr(inst, key, swig_this);
2531 #if PY_VERSION_HEX >= 0x03000000
2532 inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2534 PyObject_SetAttr(inst, SWIG_This(), swig_this);
2535 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2538 PyObject *dict = PyDict_New();
2540 PyDict_SetItem(dict, SWIG_This(), swig_this);
2541 inst = PyInstance_NewRaw(data->newargs, dict);
2548 #if (PY_VERSION_HEX >= 0x02010000)
2550 PyObject *dict = PyDict_New();
2552 PyDict_SetItem(dict, SWIG_This(), swig_this);
2553 inst = PyInstance_NewRaw(data->newargs, dict);
2556 return (PyObject *) inst;
2558 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2562 inst->in_class = (PyClassObject *)data->newargs;
2563 Py_INCREF(inst->in_class);
2564 inst->in_dict = PyDict_New();
2565 if (inst->in_dict == NULL) {
2569 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2570 inst->in_weakreflist = NULL;
2572 #ifdef Py_TPFLAGS_GC
2573 PyObject_GC_Init(inst);
2575 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2576 return (PyObject *) inst;
2582 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2585 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2586 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2587 if (dictptr != NULL) {
2590 dict = PyDict_New();
2593 PyDict_SetItem(dict, SWIG_This(), swig_this);
2597 dict = PyObject_GetAttrString(inst, (
char*)
"__dict__");
2598 PyDict_SetItem(dict, SWIG_This(), swig_this);
2603 SWIGINTERN PyObject *
2604 SWIG_Python_InitShadowInstance(PyObject *args) {
2606 if (!SWIG_Python_UnpackTuple(args,
"swiginit", 2, 2, obj)) {
2611 SwigPyObject_append((PyObject*) sthis, obj[1]);
2613 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2615 return SWIG_Py_Void();
2621 SWIGRUNTIME PyObject *
2622 SWIG_Python_NewPointerObj(PyObject *
self,
void *ptr,
swig_type_info *type,
int flags) {
2628 return SWIG_Py_Void();
2631 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2632 if (clientdata && clientdata->pytype) {
2634 if (flags & SWIG_BUILTIN_TP_INIT) {
2637 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2638 while (newobj->next)
2640 newobj->next = next_self;
2642 #ifdef SWIGPYTHON_BUILTIN
2647 newobj = PyObject_New(
SwigPyObject, clientdata->pytype);
2648 #ifdef SWIGPYTHON_BUILTIN
2657 return (PyObject*) newobj;
2659 return SWIG_Py_Void();
2662 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2664 robj = SwigPyObject_New(ptr, type, own);
2665 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2666 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2675 SWIGRUNTIMEINLINE PyObject *
2676 SWIG_Python_NewPackedObj(
void *ptr,
size_t sz,
swig_type_info *type) {
2677 return ptr ? SwigPyPacked_New((
void *) ptr, sz, type) : SWIG_Py_Void();
2684 #ifdef SWIG_LINK_RUNTIME
2685 void *SWIG_ReturnGlobalTypeList(
void *);
2689 SWIG_Python_GetModule(
void *SWIGUNUSEDPARM(clientdata)) {
2690 static void *type_pointer = (
void *)0;
2692 if (!type_pointer) {
2693 #ifdef SWIG_LINK_RUNTIME
2694 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2696 # ifdef SWIGPY_USE_CAPSULE
2697 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2699 type_pointer = PyCObject_Import((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION,
2700 (
char*)
"type_pointer" SWIG_TYPE_TABLE_NAME);
2702 if (PyErr_Occurred()) {
2704 type_pointer = (
void *)0;
2711 #if PY_MAJOR_VERSION < 2
2715 PyModule_AddObject(PyObject *m,
char *name, PyObject *o)
2718 if (!PyModule_Check(m)) {
2719 PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
2723 PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
2727 dict = PyModule_GetDict(m);
2730 PyErr_Format(PyExc_SystemError,
"module '%s' has no __dict__",
2731 PyModule_GetName(m));
2734 if (PyDict_SetItemString(dict, name, o))
2742 #ifdef SWIGPY_USE_CAPSULE
2743 SWIG_Python_DestroyModule(PyObject *obj)
2745 SWIG_Python_DestroyModule(
void *vptr)
2748 #ifdef SWIGPY_USE_CAPSULE
2755 for (i =0; i < swig_module->size; ++i) {
2759 if (data) SwigPyClientData_Del(data);
2762 Py_DECREF(SWIG_This());
2768 #if PY_VERSION_HEX >= 0x03000000
2770 PyObject *module = PyImport_AddModule((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION);
2772 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };
2773 PyObject *module = Py_InitModule((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2775 #ifdef SWIGPY_USE_CAPSULE
2776 PyObject *pointer = PyCapsule_New((
void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2777 if (pointer && module) {
2778 PyModule_AddObject(module, (
char*)
"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2780 Py_XDECREF(pointer);
2783 PyObject *pointer = PyCObject_FromVoidPtr((
void *) swig_module, SWIG_Python_DestroyModule);
2784 if (pointer && module) {
2785 PyModule_AddObject(module, (
char*)
"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2787 Py_XDECREF(pointer);
2793 SWIGRUNTIME PyObject *
2794 SWIG_Python_TypeCache(
void) {
2795 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2800 SWIG_Python_TypeQuery(
const char *type)
2802 PyObject *cache = SWIG_Python_TypeCache();
2803 PyObject *key = SWIG_Python_str_FromChar(type);
2804 PyObject *obj = PyDict_GetItem(cache, key);
2807 #ifdef SWIGPY_USE_CAPSULE
2814 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2816 #ifdef SWIGPY_USE_CAPSULE
2817 obj = PyCapsule_New((
void*) descriptor, NULL, NULL);
2819 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2821 PyDict_SetItem(cache, key, obj);
2832 #define SWIG_POINTER_EXCEPTION 0
2833 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2834 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2837 SWIG_Python_AddErrMesg(
const char* mesg,
int infront)
2839 if (PyErr_Occurred()) {
2841 PyObject *value = 0;
2842 PyObject *traceback = 0;
2843 PyErr_Fetch(&type, &value, &traceback);
2846 PyObject *old_str = PyObject_Str(value);
2850 PyErr_Format(type,
"%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2852 PyErr_Format(type,
"%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2854 SWIG_Python_str_DelForPy3(tmp);
2864 SWIG_Python_ArgFail(
int argnum)
2866 if (PyErr_Occurred()) {
2869 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2870 return SWIG_Python_AddErrMesg(mesg, 1);
2876 SWIGRUNTIMEINLINE
const char *
2877 SwigPyObject_GetDesc(PyObject *
self)
2881 return ty ? ty->str :
"";
2885 SWIG_Python_TypeError(
const char *type, PyObject *obj)
2888 #if defined(SWIG_COBJECT_TYPES)
2889 if (obj && SwigPyObject_Check(obj)) {
2890 const char *otype = (
const char *) SwigPyObject_GetDesc(obj);
2892 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2899 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2901 PyObject *str = PyObject_Str(obj);
2902 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2904 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2906 SWIG_Python_str_DelForPy3(cstr);
2908 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2915 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2917 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2924 SWIG_Python_MustGetPtr(PyObject *obj,
swig_type_info *ty,
int SWIGUNUSEDPARM(argnum),
int flags) {
2926 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2928 #if SWIG_POINTER_EXCEPTION
2930 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2931 SWIG_Python_ArgFail(argnum);
2938 #ifdef SWIGPYTHON_BUILTIN
2940 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2941 PyTypeObject *tp = obj->ob_type;
2943 PyObject *encoded_name;
2947 # ifdef Py_USING_UNICODE
2948 if (PyString_Check(name)) {
2949 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2952 }
else if (!PyUnicode_Check(name))
2954 if (!PyString_Check(name))
2957 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2964 if (PyType_Ready(tp) < 0)
2968 descr = _PyType_Lookup(tp, name);
2971 f = descr->ob_type->tp_descr_set;
2973 if (PyString_Check(name)) {
2974 encoded_name = name;
2977 encoded_name = PyUnicode_AsUTF8String(name);
2979 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2980 Py_DECREF(encoded_name);
2982 res = f(descr, obj, value);
2998 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
3000 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3006 #define SWIGTYPE_p_Crev swig_types[0]
3007 #define SWIGTYPE_p_FILE swig_types[1]
3008 #define SWIGTYPE_p_MapLong2Long swig_types[2]
3009 #define SWIGTYPE_p_Node swig_types[3]
3010 #define SWIGTYPE_p_T swig_types[4]
3011 #define SWIGTYPE_p_TI swig_types[5]
3012 #define SWIGTYPE_p_char swig_types[6]
3013 #define SWIGTYPE_p_component_t swig_types[7]
3014 #define SWIGTYPE_p_distance_t swig_types[8]
3015 #define SWIGTYPE_p_double swig_types[9]
3016 #define SWIGTYPE_p_faiss__ArrayInvertedLists swig_types[10]
3017 #define SWIGTYPE_p_faiss__AutoTuneCriterion swig_types[11]
3018 #define SWIGTYPE_p_faiss__BinaryInvertedListScanner swig_types[12]
3019 #define SWIGTYPE_p_faiss__BufferList swig_types[13]
3020 #define SWIGTYPE_p_faiss__CenteringTransform swig_types[14]
3021 #define SWIGTYPE_p_faiss__Cloner swig_types[15]
3022 #define SWIGTYPE_p_faiss__Clustering swig_types[16]
3023 #define SWIGTYPE_p_faiss__ClusteringParameters swig_types[17]
3024 #define SWIGTYPE_p_faiss__ConcatenatedInvertedLists swig_types[18]
3025 #define SWIGTYPE_p_faiss__DistanceComputer swig_types[19]
3026 #define SWIGTYPE_p_faiss__GenHammingComputer16 swig_types[20]
3027 #define SWIGTYPE_p_faiss__GenHammingComputer32 swig_types[21]
3028 #define SWIGTYPE_p_faiss__GenHammingComputer8 swig_types[22]
3029 #define SWIGTYPE_p_faiss__GenHammingComputerM8 swig_types[23]
3030 #define SWIGTYPE_p_faiss__HNSW swig_types[24]
3031 #define SWIGTYPE_p_faiss__HNSWStats swig_types[25]
3032 #define SWIGTYPE_p_faiss__HNSW__MinimaxHeap swig_types[26]
3033 #define SWIGTYPE_p_faiss__HammingComputer16 swig_types[27]
3034 #define SWIGTYPE_p_faiss__HammingComputer20 swig_types[28]
3035 #define SWIGTYPE_p_faiss__HammingComputer32 swig_types[29]
3036 #define SWIGTYPE_p_faiss__HammingComputer4 swig_types[30]
3037 #define SWIGTYPE_p_faiss__HammingComputer64 swig_types[31]
3038 #define SWIGTYPE_p_faiss__HammingComputer8 swig_types[32]
3039 #define SWIGTYPE_p_faiss__HammingComputerDefault swig_types[33]
3040 #define SWIGTYPE_p_faiss__HammingComputerM4 swig_types[34]
3041 #define SWIGTYPE_p_faiss__HammingComputerM8 swig_types[35]
3042 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t swig_types[36]
3043 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t swig_types[37]
3044 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t swig_types[38]
3045 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t swig_types[39]
3046 #define SWIGTYPE_p_faiss__IDSelector swig_types[40]
3047 #define SWIGTYPE_p_faiss__IDSelectorBatch swig_types[41]
3048 #define SWIGTYPE_p_faiss__IDSelectorRange swig_types[42]
3049 #define SWIGTYPE_p_faiss__IOReader swig_types[43]
3050 #define SWIGTYPE_p_faiss__IOWriter swig_types[44]
3051 #define SWIGTYPE_p_faiss__IVFPQSearchParameters swig_types[45]
3052 #define SWIGTYPE_p_faiss__IVFSearchParameters swig_types[46]
3053 #define SWIGTYPE_p_faiss__Index swig_types[47]
3054 #define SWIGTYPE_p_faiss__Index2Layer swig_types[48]
3055 #define SWIGTYPE_p_faiss__IndexBinary swig_types[49]
3056 #define SWIGTYPE_p_faiss__IndexBinaryFlat swig_types[50]
3057 #define SWIGTYPE_p_faiss__IndexBinaryFromFloat swig_types[51]
3058 #define SWIGTYPE_p_faiss__IndexBinaryHNSW swig_types[52]
3059 #define SWIGTYPE_p_faiss__IndexBinaryIVF swig_types[53]
3060 #define SWIGTYPE_p_faiss__IndexFlat swig_types[54]
3061 #define SWIGTYPE_p_faiss__IndexFlat1D swig_types[55]
3062 #define SWIGTYPE_p_faiss__IndexFlatIP swig_types[56]
3063 #define SWIGTYPE_p_faiss__IndexFlatL2 swig_types[57]
3064 #define SWIGTYPE_p_faiss__IndexFlatL2BaseShift swig_types[58]
3065 #define SWIGTYPE_p_faiss__IndexHNSW swig_types[59]
3066 #define SWIGTYPE_p_faiss__IndexHNSW2Level swig_types[60]
3067 #define SWIGTYPE_p_faiss__IndexHNSWFlat swig_types[61]
3068 #define SWIGTYPE_p_faiss__IndexHNSWPQ swig_types[62]
3069 #define SWIGTYPE_p_faiss__IndexHNSWSQ swig_types[63]
3070 #define SWIGTYPE_p_faiss__IndexIDMap swig_types[64]
3071 #define SWIGTYPE_p_faiss__IndexIDMap2 swig_types[65]
3072 #define SWIGTYPE_p_faiss__IndexIVF swig_types[66]
3073 #define SWIGTYPE_p_faiss__IndexIVFFlat swig_types[67]
3074 #define SWIGTYPE_p_faiss__IndexIVFFlatDedup swig_types[68]
3075 #define SWIGTYPE_p_faiss__IndexIVFPQ swig_types[69]
3076 #define SWIGTYPE_p_faiss__IndexIVFPQR swig_types[70]
3077 #define SWIGTYPE_p_faiss__IndexIVFPQStats swig_types[71]
3078 #define SWIGTYPE_p_faiss__IndexIVFScalarQuantizer swig_types[72]
3079 #define SWIGTYPE_p_faiss__IndexIVFStats swig_types[73]
3080 #define SWIGTYPE_p_faiss__IndexLSH swig_types[74]
3081 #define SWIGTYPE_p_faiss__IndexPQ swig_types[75]
3082 #define SWIGTYPE_p_faiss__IndexPQStats swig_types[76]
3083 #define SWIGTYPE_p_faiss__IndexPreTransform swig_types[77]
3084 #define SWIGTYPE_p_faiss__IndexRefineFlat swig_types[78]
3085 #define SWIGTYPE_p_faiss__IndexReplicasTemplateT_faiss__IndexBinary_t swig_types[79]
3086 #define SWIGTYPE_p_faiss__IndexReplicasTemplateT_faiss__Index_t swig_types[80]
3087 #define SWIGTYPE_p_faiss__IndexScalarQuantizer swig_types[81]
3088 #define SWIGTYPE_p_faiss__IndexShardsTemplateT_faiss__IndexBinary_t swig_types[82]
3089 #define SWIGTYPE_p_faiss__IndexShardsTemplateT_faiss__Index_t swig_types[83]
3090 #define SWIGTYPE_p_faiss__IndexSplitVectors swig_types[84]
3091 #define SWIGTYPE_p_faiss__InterruptCallback swig_types[85]
3092 #define SWIGTYPE_p_faiss__IntersectionCriterion swig_types[86]
3093 #define SWIGTYPE_p_faiss__InvertedListScanner swig_types[87]
3094 #define SWIGTYPE_p_faiss__InvertedLists swig_types[88]
3095 #define SWIGTYPE_p_faiss__Level1Quantizer swig_types[89]
3096 #define SWIGTYPE_p_faiss__LinearTransform swig_types[90]
3097 #define SWIGTYPE_p_faiss__LockLevels swig_types[91]
3098 #define SWIGTYPE_p_faiss__MatrixStats swig_types[92]
3099 #define SWIGTYPE_p_faiss__MultiIndexQuantizer swig_types[93]
3100 #define SWIGTYPE_p_faiss__MultiIndexQuantizer2 swig_types[94]
3101 #define SWIGTYPE_p_faiss__NormalizationTransform swig_types[95]
3102 #define SWIGTYPE_p_faiss__OPQMatrix swig_types[96]
3103 #define SWIGTYPE_p_faiss__OnDiskInvertedLists swig_types[97]
3104 #define SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch swig_types[98]
3105 #define SWIGTYPE_p_faiss__OneRecallAtRCriterion swig_types[99]
3106 #define SWIGTYPE_p_faiss__OperatingPoint swig_types[100]
3107 #define SWIGTYPE_p_faiss__OperatingPoints swig_types[101]
3108 #define SWIGTYPE_p_faiss__PCAMatrix swig_types[102]
3109 #define SWIGTYPE_p_faiss__ParameterRange swig_types[103]
3110 #define SWIGTYPE_p_faiss__ParameterSpace swig_types[104]
3111 #define SWIGTYPE_p_faiss__PermutationObjective swig_types[105]
3112 #define SWIGTYPE_p_faiss__PolysemousTraining swig_types[106]
3113 #define SWIGTYPE_p_faiss__ProductQuantizer swig_types[107]
3114 #define SWIGTYPE_p_faiss__RandomGenerator swig_types[108]
3115 #define SWIGTYPE_p_faiss__RandomRotationMatrix swig_types[109]
3116 #define SWIGTYPE_p_faiss__RangeQueryResult swig_types[110]
3117 #define SWIGTYPE_p_faiss__RangeSearchPartialResult swig_types[111]
3118 #define SWIGTYPE_p_faiss__RangeSearchResult swig_types[112]
3119 #define SWIGTYPE_p_faiss__ReconstructFromNeighbors swig_types[113]
3120 #define SWIGTYPE_p_faiss__RemapDimensionsTransform swig_types[114]
3121 #define SWIGTYPE_p_faiss__ReproduceDistancesObjective swig_types[115]
3122 #define SWIGTYPE_p_faiss__SQDistanceComputer swig_types[116]
3123 #define SWIGTYPE_p_faiss__ScalarQuantizer swig_types[117]
3124 #define SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer swig_types[118]
3125 #define SWIGTYPE_p_faiss__SimulatedAnnealingParameters swig_types[119]
3126 #define SWIGTYPE_p_faiss__VectorIOReader swig_types[120]
3127 #define SWIGTYPE_p_faiss__VectorIOWriter swig_types[121]
3128 #define SWIGTYPE_p_faiss__VectorTransform swig_types[122]
3129 #define SWIGTYPE_p_faiss__VisitedTable swig_types[123]
3130 #define SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow swig_types[124]
3131 #define SWIGTYPE_p_float swig_types[125]
3132 #define SWIGTYPE_p_idx_t swig_types[126]
3133 #define SWIGTYPE_p_int swig_types[127]
3134 #define SWIGTYPE_p_long swig_types[128]
3135 #define SWIGTYPE_p_omp_lock_t swig_types[129]
3136 #define SWIGTYPE_p_p_faiss__ArrayInvertedLists swig_types[130]
3137 #define SWIGTYPE_p_p_faiss__CenteringTransform swig_types[131]
3138 #define SWIGTYPE_p_p_faiss__ConcatenatedInvertedLists swig_types[132]
3139 #define SWIGTYPE_p_p_faiss__Index swig_types[133]
3140 #define SWIGTYPE_p_p_faiss__Index2Layer swig_types[134]
3141 #define SWIGTYPE_p_p_faiss__IndexFlat swig_types[135]
3142 #define SWIGTYPE_p_p_faiss__IndexFlat1D swig_types[136]
3143 #define SWIGTYPE_p_p_faiss__IndexFlatIP swig_types[137]
3144 #define SWIGTYPE_p_p_faiss__IndexFlatL2 swig_types[138]
3145 #define SWIGTYPE_p_p_faiss__IndexFlatL2BaseShift swig_types[139]
3146 #define SWIGTYPE_p_p_faiss__IndexHNSW swig_types[140]
3147 #define SWIGTYPE_p_p_faiss__IndexHNSW2Level swig_types[141]
3148 #define SWIGTYPE_p_p_faiss__IndexHNSWFlat swig_types[142]
3149 #define SWIGTYPE_p_p_faiss__IndexHNSWPQ swig_types[143]
3150 #define SWIGTYPE_p_p_faiss__IndexHNSWSQ swig_types[144]
3151 #define SWIGTYPE_p_p_faiss__IndexIDMap swig_types[145]
3152 #define SWIGTYPE_p_p_faiss__IndexIDMap2 swig_types[146]
3153 #define SWIGTYPE_p_p_faiss__IndexIVF swig_types[147]
3154 #define SWIGTYPE_p_p_faiss__IndexIVFFlat swig_types[148]
3155 #define SWIGTYPE_p_p_faiss__IndexIVFFlatDedup swig_types[149]
3156 #define SWIGTYPE_p_p_faiss__IndexIVFPQ swig_types[150]
3157 #define SWIGTYPE_p_p_faiss__IndexIVFPQR swig_types[151]
3158 #define SWIGTYPE_p_p_faiss__IndexIVFScalarQuantizer swig_types[152]
3159 #define SWIGTYPE_p_p_faiss__IndexLSH swig_types[153]
3160 #define SWIGTYPE_p_p_faiss__IndexPQ swig_types[154]
3161 #define SWIGTYPE_p_p_faiss__IndexPreTransform swig_types[155]
3162 #define SWIGTYPE_p_p_faiss__IndexRefineFlat swig_types[156]
3163 #define SWIGTYPE_p_p_faiss__IndexReplicasTemplateT_faiss__Index_t swig_types[157]
3164 #define SWIGTYPE_p_p_faiss__IndexScalarQuantizer swig_types[158]
3165 #define SWIGTYPE_p_p_faiss__IndexShardsTemplateT_faiss__Index_t swig_types[159]
3166 #define SWIGTYPE_p_p_faiss__IndexSplitVectors swig_types[160]
3167 #define SWIGTYPE_p_p_faiss__InvertedLists swig_types[161]
3168 #define SWIGTYPE_p_p_faiss__LinearTransform swig_types[162]
3169 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer swig_types[163]
3170 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer2 swig_types[164]
3171 #define SWIGTYPE_p_p_faiss__NormalizationTransform swig_types[165]
3172 #define SWIGTYPE_p_p_faiss__OPQMatrix swig_types[166]
3173 #define SWIGTYPE_p_p_faiss__OnDiskInvertedLists swig_types[167]
3174 #define SWIGTYPE_p_p_faiss__PCAMatrix swig_types[168]
3175 #define SWIGTYPE_p_p_faiss__RandomRotationMatrix swig_types[169]
3176 #define SWIGTYPE_p_p_faiss__RemapDimensionsTransform swig_types[170]
3177 #define SWIGTYPE_p_p_faiss__VectorTransform swig_types[171]
3178 #define SWIGTYPE_p_std__functionT_void_ffaiss__IndexBinary_pF_t swig_types[172]
3179 #define SWIGTYPE_p_std__functionT_void_ffaiss__Index_pF_t swig_types[173]
3180 #define SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t swig_types[174]
3181 #define SWIGTYPE_p_std__mt19937 swig_types[175]
3182 #define SWIGTYPE_p_std__pairT_float_int_t swig_types[176]
3183 #define SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t swig_types[177]
3184 #define SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t swig_types[178]
3185 #define SWIGTYPE_p_std__unordered_mapT_long_long_t swig_types[179]
3186 #define SWIGTYPE_p_std__unordered_mapT_unsigned_long_faiss__MatrixStats__Occurrence_t swig_types[180]
3187 #define SWIGTYPE_p_std__unordered_multimapT_long_long_t swig_types[181]
3188 #define SWIGTYPE_p_std__vectorT_char_t swig_types[182]
3189 #define SWIGTYPE_p_std__vectorT_double_t swig_types[183]
3190 #define SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t swig_types[184]
3191 #define SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t swig_types[185]
3192 #define SWIGTYPE_p_std__vectorT_faiss__IndexBinary_p_t swig_types[186]
3193 #define SWIGTYPE_p_std__vectorT_faiss__Index_p_t swig_types[187]
3194 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t swig_types[188]
3195 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t swig_types[189]
3196 #define SWIGTYPE_p_std__vectorT_faiss__MatrixStats__PerDimStats_t swig_types[190]
3197 #define SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t swig_types[191]
3198 #define SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t swig_types[192]
3199 #define SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t swig_types[193]
3200 #define SWIGTYPE_p_std__vectorT_faiss__RangeQueryResult_t swig_types[194]
3201 #define SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t swig_types[195]
3202 #define SWIGTYPE_p_std__vectorT_float_t swig_types[196]
3203 #define SWIGTYPE_p_std__vectorT_int_t swig_types[197]
3204 #define SWIGTYPE_p_std__vectorT_long_t swig_types[198]
3205 #define SWIGTYPE_p_std__vectorT_omp_lock_t_t swig_types[199]
3206 #define SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t swig_types[200]
3207 #define SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t swig_types[201]
3208 #define SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t swig_types[202]
3209 #define SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t swig_types[203]
3210 #define SWIGTYPE_p_std__vectorT_unsigned_char_t swig_types[204]
3211 #define SWIGTYPE_p_std__vectorT_unsigned_long_t swig_types[205]
3212 #define SWIGTYPE_p_storage_idx_t swig_types[206]
3213 #define SWIGTYPE_p_uint32_t swig_types[207]
3214 #define SWIGTYPE_p_unsigned_char swig_types[208]
3215 #define SWIGTYPE_p_unsigned_long swig_types[209]
3216 #define SWIGTYPE_p_void swig_types[210]
3219 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3220 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3224 #if (PY_VERSION_HEX <= 0x02000000)
3225 # if !defined(SWIG_PYTHON_CLASSIC)
3226 # error "This python version requires swig to be run with the '-classic' option"
3233 #if PY_VERSION_HEX >= 0x03000000
3234 # define SWIG_init PyInit__swigfaiss
3237 # define SWIG_init init_swigfaiss
3240 #define SWIG_name "_swigfaiss"
3242 #define SWIGVERSION 0x030012
3243 #define SWIG_VERSION SWIGVERSION
3246 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3247 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3250 #include <stdexcept>
3265 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3267 SWIG_PYTHON_THREAD_END_BLOCK;
3273 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3275 SWIG_PYTHON_THREAD_END_BLOCK;
3281 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3282 Py_XINCREF(item._obj);
3285 SWIG_PYTHON_THREAD_END_BLOCK;
3291 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3293 SWIG_PYTHON_THREAD_END_BLOCK;
3296 operator PyObject *()
const
3301 PyObject *operator->()
const
3331 #include <pthread.h>
3348 #define SWIG_FILE_WITH_INIT
3349 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
3350 #include <numpy/arrayobject.h>
3355 #include "IndexFlat.h"
3356 #include "VectorTransform.h"
3357 #include "IndexLSH.h"
3358 #include "IndexPQ.h"
3359 #include "IndexIVF.h"
3360 #include "IndexIVFPQ.h"
3361 #include "IndexIVFFlat.h"
3362 #include "IndexScalarQuantizer.h"
3363 #include "IndexShards.h"
3364 #include "IndexReplicas.h"
3366 #include "IndexHNSW.h"
3367 #include "MetaIndexes.h"
3368 #include "FaissAssert.h"
3370 #include "IndexBinaryFlat.h"
3371 #include "IndexBinaryIVF.h"
3372 #include "IndexBinaryFromFloat.h"
3373 #include "IndexBinaryHNSW.h"
3375 #include "index_io.h"
3380 #include "AuxIndexStructures.h"
3381 #include "OnDiskInvertedLists.h"
3383 #include "Clustering.h"
3385 #include "hamming.h"
3387 #include "AutoTune.h"
3400 #ifndef SWIG_isfinite
3402 # if defined(isfinite)
3403 # define SWIG_isfinite(X) (isfinite(X))
3404 # elif defined __cplusplus && __cplusplus >= 201103L
3414 extern "C++" template<
typename T>
3415 inline int SWIG_isfinite_func(T x) {
3416 using namespace std;
3419 # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
3420 # elif defined(_MSC_VER)
3421 # define SWIG_isfinite(X) (_finite(X))
3422 # elif defined(__sun) && defined(__SVR4)
3423 # include <ieeefp.h>
3424 # define SWIG_isfinite(X) (finite(X))
3430 #ifdef SWIG_isfinite
3431 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
3433 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
3438 SWIG_AsVal_double (PyObject *obj,
double *val)
3440 int res = SWIG_TypeError;
3441 if (PyFloat_Check(obj)) {
3442 if (val) *val = PyFloat_AsDouble(obj);
3444 #if PY_VERSION_HEX < 0x03000000
3445 }
else if (PyInt_Check(obj)) {
3446 if (val) *val = (double) PyInt_AsLong(obj);
3449 }
else if (PyLong_Check(obj)) {
3450 double v = PyLong_AsDouble(obj);
3451 if (!PyErr_Occurred()) {
3458 #ifdef SWIG_PYTHON_CAST_MODE
3461 double d = PyFloat_AsDouble(obj);
3462 if (!PyErr_Occurred()) {
3464 return SWIG_AddCast(SWIG_OK);
3469 long v = PyLong_AsLong(obj);
3470 if (!PyErr_Occurred()) {
3472 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3484 SWIG_AsVal_float (PyObject * obj,
float *val)
3487 int res = SWIG_AsVal_double (obj, &v);
3488 if (SWIG_IsOK(res)) {
3489 if (SWIG_Float_Overflow_Check(v)) {
3490 return SWIG_OverflowError;
3492 if (val) *val =
static_cast< float >(v);
3499 #define SWIG_From_long PyInt_FromLong
3502 SWIGINTERNINLINE PyObject*
3503 SWIG_From_unsigned_SS_long (
unsigned long value)
3505 return (value > LONG_MAX) ?
3506 PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
3511 #if !defined(SWIG_NO_LLONG_MAX)
3512 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3513 # define LLONG_MAX __LONG_LONG_MAX__
3514 # define LLONG_MIN (-LLONG_MAX - 1LL)
3515 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3520 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3521 # define SWIG_LONG_LONG_AVAILABLE
3525 #ifdef SWIG_LONG_LONG_AVAILABLE
3526 SWIGINTERNINLINE PyObject*
3527 SWIG_From_unsigned_SS_long_SS_long (
unsigned long long value)
3529 return (value > LONG_MAX) ?
3530 PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
3535 SWIGINTERNINLINE PyObject *
3536 SWIG_From_size_t (
size_t value)
3538 #ifdef SWIG_LONG_LONG_AVAILABLE
3539 if (
sizeof(
size_t) <=
sizeof(
unsigned long)) {
3541 return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
3542 #ifdef SWIG_LONG_LONG_AVAILABLE
3545 return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
3551 SWIGINTERNINLINE
int
3552 SWIG_CanCastAsInteger(
double *d,
double min,
double max) {
3554 if ((min <= x && x <= max)) {
3555 double fx = floor(x);
3556 double cx = ceil(x);
3557 double rd = ((x - fx) < 0.5) ? fx : cx;
3558 if ((errno == EDOM) || (errno == ERANGE)) {
3561 double summ, reps, diff;
3564 }
else if (rd > x) {
3571 if (reps < 8*DBL_EPSILON) {
3582 SWIG_AsVal_unsigned_SS_long (PyObject *obj,
unsigned long *val)
3584 #if PY_VERSION_HEX < 0x03000000
3585 if (PyInt_Check(obj)) {
3586 long v = PyInt_AsLong(obj);
3591 return SWIG_OverflowError;
3595 if (PyLong_Check(obj)) {
3596 unsigned long v = PyLong_AsUnsignedLong(obj);
3597 if (!PyErr_Occurred()) {
3602 return SWIG_OverflowError;
3605 #ifdef SWIG_PYTHON_CAST_MODE
3608 unsigned long v = PyLong_AsUnsignedLong(obj);
3609 if (!PyErr_Occurred()) {
3611 return SWIG_AddCast(SWIG_OK);
3617 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3618 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3619 if (val) *val = (
unsigned long)(d);
3625 return SWIG_TypeError;
3629 #ifdef SWIG_LONG_LONG_AVAILABLE
3631 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj,
unsigned long long *val)
3633 int res = SWIG_TypeError;
3634 if (PyLong_Check(obj)) {
3635 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3636 if (!PyErr_Occurred()) {
3641 res = SWIG_OverflowError;
3645 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3646 if (SWIG_IsOK(res)) {
3651 #ifdef SWIG_PYTHON_CAST_MODE
3653 const double mant_max = 1LL << DBL_MANT_DIG;
3655 res = SWIG_AsVal_double (obj,&d);
3656 if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
3657 return SWIG_OverflowError;
3658 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3659 if (val) *val = (
unsigned long long)(d);
3660 return SWIG_AddCast(res);
3662 res = SWIG_TypeError;
3670 SWIGINTERNINLINE
int
3671 SWIG_AsVal_size_t (PyObject * obj,
size_t *val)
3673 int res = SWIG_TypeError;
3674 #ifdef SWIG_LONG_LONG_AVAILABLE
3675 if (
sizeof(
size_t) <=
sizeof(
unsigned long)) {
3678 res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3679 if (SWIG_IsOK(res) && val) *val =
static_cast< size_t >(v);
3680 #ifdef SWIG_LONG_LONG_AVAILABLE
3681 }
else if (
sizeof(
size_t) <=
sizeof(
unsigned long long)) {
3682 unsigned long long v;
3683 res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
3684 if (SWIG_IsOK(res) && val) *val =
static_cast< size_t >(v);
3691 #define SWIG_From_double PyFloat_FromDouble
3694 SWIGINTERNINLINE PyObject *
3695 SWIG_From_float (
float value)
3697 return SWIG_From_double (value);
3702 SWIG_AsVal_unsigned_SS_char (PyObject * obj,
unsigned char *val)
3705 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3706 if (SWIG_IsOK(res)) {
3707 if ((v > UCHAR_MAX)) {
3708 return SWIG_OverflowError;
3710 if (val) *val =
static_cast< unsigned char >(v);
3717 SWIGINTERNINLINE PyObject *
3718 SWIG_From_unsigned_SS_char (
unsigned char value)
3720 return SWIG_From_unsigned_SS_long (value);
3725 SWIG_pchar_descriptor(
void)
3727 static int init = 0;
3730 info = SWIG_TypeQuery(
"_p_char");
3738 SWIG_AsCharPtrAndSize(PyObject *obj,
char** cptr,
size_t* psize,
int *alloc)
3740 #if PY_VERSION_HEX>=0x03000000
3741 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3742 if (PyBytes_Check(obj))
3744 if (PyUnicode_Check(obj))
3747 if (PyString_Check(obj))
3750 char *cstr; Py_ssize_t len;
3751 #if PY_VERSION_HEX>=0x03000000
3752 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3753 if (!alloc && cptr) {
3758 return SWIG_RuntimeError;
3760 obj = PyUnicode_AsUTF8String(obj);
3761 if(alloc) *alloc = SWIG_NEWOBJ;
3763 PyBytes_AsStringAndSize(obj, &cstr, &len);
3765 PyString_AsStringAndSize(obj, &cstr, &len);
3778 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3779 if (*alloc != SWIG_OLDOBJ)
3781 if (*alloc == SWIG_NEWOBJ)
3784 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3785 *alloc = SWIG_NEWOBJ;
3788 *alloc = SWIG_OLDOBJ;
3791 #if PY_VERSION_HEX>=0x03000000
3792 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3793 *cptr = PyBytes_AsString(obj);
3798 *cptr = SWIG_Python_str_AsChar(obj);
3802 if (psize) *psize = len + 1;
3803 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3808 #if defined(SWIG_PYTHON_2_UNICODE)
3809 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3810 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3812 #if PY_VERSION_HEX<0x03000000
3813 if (PyUnicode_Check(obj)) {
3814 char *cstr; Py_ssize_t len;
3815 if (!alloc && cptr) {
3816 return SWIG_RuntimeError;
3818 obj = PyUnicode_AsUTF8String(obj);
3819 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3821 if (alloc) *alloc = SWIG_NEWOBJ;
3822 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3824 if (psize) *psize = len + 1;
3836 if (pchar_descriptor) {
3838 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3839 if (cptr) *cptr = (
char *) vptr;
3840 if (psize) *psize = vptr ? (strlen((
char *)vptr) + 1) : 0;
3841 if (alloc) *alloc = SWIG_OLDOBJ;
3846 return SWIG_TypeError;
3851 SWIG_AsCharArray(PyObject * obj,
char *val,
size_t size)
3853 char* cptr = 0;
size_t csize = 0;
int alloc = SWIG_OLDOBJ;
3854 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3855 if (SWIG_IsOK(res)) {
3857 if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
3858 if (csize <= size) {
3860 if (csize) memcpy(val, cptr, csize*
sizeof(
char));
3861 if (csize < size) memset(val + csize, 0, (size - csize)*
sizeof(
char));
3863 if (alloc == SWIG_NEWOBJ) {
3865 res = SWIG_DelNewMask(res);
3869 if (alloc == SWIG_NEWOBJ)
delete[] cptr;
3871 return SWIG_TypeError;
3876 SWIG_AsVal_long (PyObject *obj,
long* val)
3878 #if PY_VERSION_HEX < 0x03000000
3879 if (PyInt_Check(obj)) {
3880 if (val) *val = PyInt_AsLong(obj);
3884 if (PyLong_Check(obj)) {
3885 long v = PyLong_AsLong(obj);
3886 if (!PyErr_Occurred()) {
3891 return SWIG_OverflowError;
3894 #ifdef SWIG_PYTHON_CAST_MODE
3897 long v = PyInt_AsLong(obj);
3898 if (!PyErr_Occurred()) {
3900 return SWIG_AddCast(SWIG_OK);
3906 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3907 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3908 if (val) *val = (long)(d);
3914 return SWIG_TypeError;
3919 SWIG_AsVal_char (PyObject * obj,
char *val)
3921 int res = SWIG_AsCharArray(obj, val, 1);
3922 if (!SWIG_IsOK(res)) {
3924 res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
3925 if (SWIG_IsOK(res)) {
3926 if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
3927 if (val) *val =
static_cast< char >(v);
3929 res = SWIG_OverflowError;
3937 SWIGINTERNINLINE PyObject *
3938 SWIG_FromCharPtrAndSize(
const char* carray,
size_t size)
3941 if (size > INT_MAX) {
3943 return pchar_descriptor ?
3944 SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3946 #if PY_VERSION_HEX >= 0x03000000
3947 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3948 return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3950 #if PY_VERSION_HEX >= 0x03010000
3951 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size),
"surrogateescape");
3953 return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3957 return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3961 return SWIG_Py_Void();
3966 SWIGINTERNINLINE PyObject *
3967 SWIG_FromCharPtr(
const char *cptr)
3969 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3973 SWIGINTERNINLINE PyObject *
3974 SWIG_From_char (
char c)
3976 return SWIG_FromCharPtrAndSize(&c,1);
3981 SWIG_AsVal_int (PyObject * obj,
int *val)
3984 int res = SWIG_AsVal_long (obj, &v);
3985 if (SWIG_IsOK(res)) {
3986 if ((v < INT_MIN || v > INT_MAX)) {
3987 return SWIG_OverflowError;
3989 if (val) *val =
static_cast< int >(v);
3996 SWIGINTERNINLINE PyObject*
3997 SWIG_From_int (
int value)
3999 return PyInt_FromLong((
long) value);
4013 SWIG_AsVal_bool (PyObject *obj,
bool *val)
4016 if (!PyBool_Check(obj))
4018 r = PyObject_IsTrue(obj);
4021 if (val) *val = r ?
true :
false;
4026 SWIGINTERNINLINE PyObject*
4027 SWIG_From_bool (
bool value)
4029 return PyBool_FromLong(value ? 1 : 0);
4034 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
4036 char* buf = 0 ;
size_t size = 0;
int alloc = SWIG_OLDOBJ;
4037 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
4039 if (val) *val =
new std::string(buf, size - 1);
4040 if (alloc == SWIG_NEWOBJ)
delete[] buf;
4047 static int init = 0;
4050 descriptor = SWIG_TypeQuery(
"std::string" " *");
4055 int res = SWIG_ConvertPtr(obj, (
void**)&vptr, descriptor, 0);
4056 if (SWIG_IsOK(res) && val) *val = vptr;
4064 SWIGINTERNINLINE PyObject *
4065 SWIG_From_std_string (
const std::string& s)
4067 return SWIG_FromCharPtrAndSize(s.data(), s.size());
4088 PyObject *swig_ptr (PyObject *a)
4090 if(!PyArray_Check(a)) {
4091 PyErr_SetString(PyExc_ValueError,
"input not a numpy array");
4094 PyArrayObject *ao = (PyArrayObject *)a;
4096 if(!PyArray_ISCONTIGUOUS(ao)) {
4097 PyErr_SetString(PyExc_ValueError,
"array is not C-contiguous");
4100 void * data = PyArray_DATA(ao);
4101 if(PyArray_TYPE(ao) == NPY_FLOAT32) {
4102 return SWIG_NewPointerObj(data, SWIGTYPE_p_float, 0);
4104 if(PyArray_TYPE(ao) == NPY_FLOAT64) {
4105 return SWIG_NewPointerObj(data, SWIGTYPE_p_double, 0);
4107 if(PyArray_TYPE(ao) == NPY_INT32) {
4108 return SWIG_NewPointerObj(data, SWIGTYPE_p_int, 0);
4110 if(PyArray_TYPE(ao) == NPY_UINT8) {
4111 return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_char, 0);
4113 if(PyArray_TYPE(ao) == NPY_INT8) {
4114 return SWIG_NewPointerObj(data, SWIGTYPE_p_char, 0);
4116 if(PyArray_TYPE(ao) == NPY_UINT64) {
4117 return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0);
4119 if(PyArray_TYPE(ao) == NPY_INT64) {
4120 return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0);
4122 PyErr_SetString(PyExc_ValueError,
"did not recognize array type");
4129 bool want_interrupt ()
override {
4132 PyGILState_STATE gstate;
4133 gstate = PyGILState_Ensure();
4134 err = PyErr_CheckSignals();
4135 PyGILState_Release(gstate);
4145 PyObject * rev_swig_ptr(
float *src, npy_intp size) {
4146 return PyArray_SimpleNewFromData(1, &size, NPY_FLOAT32, src);
4150 PyObject * rev_swig_ptr(
int *src, npy_intp size) {
4151 return PyArray_SimpleNewFromData(1, &size, NPY_INT32, src);
4155 PyObject * rev_swig_ptr(
unsigned char *src, npy_intp size) {
4156 return PyArray_SimpleNewFromData(1, &size, NPY_UINT8, src);
4160 PyObject * rev_swig_ptr(
unsigned long *src, npy_intp size) {
4161 return PyArray_SimpleNewFromData(1, &size, NPY_UINT64, src);
4165 PyObject * rev_swig_ptr(
long *src, npy_intp size) {
4166 return PyArray_SimpleNewFromData(1, &size, NPY_INT64, src);
4170 float * cast_integer_to_float_ptr (
long x) {
4174 long * cast_integer_to_long_ptr (
long x) {
4178 int * cast_integer_to_int_ptr (
long x) {
4187 void ignore_SIGTTIN() {
4188 signal(SIGTTIN, SIG_IGN);
4197 std::unordered_map<long, long> map;
4199 void add(
size_t n,
const long *keys,
const long *vals) {
4200 map.reserve(map.size() + n);
4201 for (
size_t i = 0; i < n; i++) {
4202 map[keys[i]] = vals[i];
4206 long search(
long key) {
4207 if (map.count(key) == 0) {
4214 void search_multiple(
size_t n,
const long *keys,
long * vals) {
4215 for (
size_t i = 0; i < n; i++) {
4216 vals[i] = search(keys[i]);
4225 SWIGINTERN PyObject *_wrap_new_FloatVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4226 PyObject *resultobj = 0;
4227 std::vector< float > *result = 0 ;
4229 if (!PyArg_ParseTuple(args,(
char *)
":new_FloatVector")) SWIG_fail;
4230 result = (std::vector< float > *)
new std::vector< float >();
4231 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_NEW | 0 );
4238 SWIGINTERN PyObject *_wrap_FloatVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4239 PyObject *resultobj = 0;
4240 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4246 PyObject * obj0 = 0 ;
4247 PyObject * obj1 = 0 ;
4249 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVector_push_back",&obj0,&obj1)) SWIG_fail;
4250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4251 if (!SWIG_IsOK(res1)) {
4252 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_push_back" "', argument " "1"" of type '" "std::vector< float > *""'");
4254 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4255 ecode2 = SWIG_AsVal_float(obj1, &val2);
4256 if (!SWIG_IsOK(ecode2)) {
4257 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "FloatVector_push_back" "', argument " "2"" of type '" "float""'");
4259 arg2 =
static_cast< float >(val2);
4260 (arg1)->push_back(arg2);
4261 resultobj = SWIG_Py_Void();
4268 SWIGINTERN PyObject *_wrap_FloatVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4269 PyObject *resultobj = 0;
4270 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4273 PyObject * obj0 = 0 ;
4275 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVector_clear",&obj0)) SWIG_fail;
4276 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4277 if (!SWIG_IsOK(res1)) {
4278 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_clear" "', argument " "1"" of type '" "std::vector< float > *""'");
4280 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4282 resultobj = SWIG_Py_Void();
4289 SWIGINTERN PyObject *_wrap_FloatVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4290 PyObject *resultobj = 0;
4291 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4294 PyObject * obj0 = 0 ;
4297 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVector_data",&obj0)) SWIG_fail;
4298 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4299 if (!SWIG_IsOK(res1)) {
4300 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_data" "', argument " "1"" of type '" "std::vector< float > *""'");
4302 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4303 result = (
float *)(arg1)->data();
4304 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
4311 SWIGINTERN PyObject *_wrap_FloatVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4312 PyObject *resultobj = 0;
4313 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4316 PyObject * obj0 = 0 ;
4319 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVector_size",&obj0)) SWIG_fail;
4320 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4321 if (!SWIG_IsOK(res1)) {
4322 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_size" "', argument " "1"" of type '" "std::vector< float > *""'");
4324 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4325 result = (size_t)(arg1)->size();
4326 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4333 SWIGINTERN PyObject *_wrap_FloatVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4334 PyObject *resultobj = 0;
4335 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4341 PyObject * obj0 = 0 ;
4342 PyObject * obj1 = 0 ;
4345 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVector_at",&obj0,&obj1)) SWIG_fail;
4346 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4347 if (!SWIG_IsOK(res1)) {
4348 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_at" "', argument " "1"" of type '" "std::vector< float > const *""'");
4350 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4351 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4352 if (!SWIG_IsOK(ecode2)) {
4353 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "FloatVector_at" "', argument " "2"" of type '" "size_t""'");
4355 arg2 =
static_cast< size_t >(val2);
4356 result = (float)((std::vector< float >
const *)arg1)->at(arg2);
4357 resultobj = SWIG_From_float(static_cast< float >(result));
4364 SWIGINTERN PyObject *_wrap_FloatVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4365 PyObject *resultobj = 0;
4366 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4372 PyObject * obj0 = 0 ;
4373 PyObject * obj1 = 0 ;
4375 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVector_resize",&obj0,&obj1)) SWIG_fail;
4376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4377 if (!SWIG_IsOK(res1)) {
4378 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_resize" "', argument " "1"" of type '" "std::vector< float > *""'");
4380 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4381 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4382 if (!SWIG_IsOK(ecode2)) {
4383 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "FloatVector_resize" "', argument " "2"" of type '" "size_t""'");
4385 arg2 =
static_cast< size_t >(val2);
4386 (arg1)->resize(arg2);
4387 resultobj = SWIG_Py_Void();
4394 SWIGINTERN PyObject *_wrap_FloatVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4395 PyObject *resultobj = 0;
4396 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4397 std::vector< float > *arg2 = 0 ;
4402 PyObject * obj0 = 0 ;
4403 PyObject * obj1 = 0 ;
4405 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVector_swap",&obj0,&obj1)) SWIG_fail;
4406 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4407 if (!SWIG_IsOK(res1)) {
4408 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVector_swap" "', argument " "1"" of type '" "std::vector< float > *""'");
4410 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4411 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 );
4412 if (!SWIG_IsOK(res2)) {
4413 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4416 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4418 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
4419 (arg1)->swap(*arg2);
4420 resultobj = SWIG_Py_Void();
4427 SWIGINTERN PyObject *_wrap_delete_FloatVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4428 PyObject *resultobj = 0;
4429 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4432 PyObject * obj0 = 0 ;
4434 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_FloatVector",&obj0)) SWIG_fail;
4435 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_DISOWN | 0 );
4436 if (!SWIG_IsOK(res1)) {
4437 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_FloatVector" "', argument " "1"" of type '" "std::vector< float > *""'");
4439 arg1 =
reinterpret_cast< std::vector< float > *
>(argp1);
4441 resultobj = SWIG_Py_Void();
4448 SWIGINTERN PyObject *FloatVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4450 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
4451 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_float_t, SWIG_NewClientData(obj));
4452 return SWIG_Py_Void();
4455 SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4456 PyObject *resultobj = 0;
4457 std::vector< double > *result = 0 ;
4459 if (!PyArg_ParseTuple(args,(
char *)
":new_DoubleVector")) SWIG_fail;
4460 result = (std::vector< double > *)
new std::vector< double >();
4461 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NEW | 0 );
4468 SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4469 PyObject *resultobj = 0;
4470 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4476 PyObject * obj0 = 0 ;
4477 PyObject * obj1 = 0 ;
4479 if (!PyArg_ParseTuple(args,(
char *)
"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail;
4480 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4481 if (!SWIG_IsOK(res1)) {
4482 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'");
4484 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4485 ecode2 = SWIG_AsVal_double(obj1, &val2);
4486 if (!SWIG_IsOK(ecode2)) {
4487 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "double""'");
4489 arg2 =
static_cast< double >(val2);
4490 (arg1)->push_back(arg2);
4491 resultobj = SWIG_Py_Void();
4498 SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4499 PyObject *resultobj = 0;
4500 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4503 PyObject * obj0 = 0 ;
4505 if (!PyArg_ParseTuple(args,(
char *)
"O:DoubleVector_clear",&obj0)) SWIG_fail;
4506 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4507 if (!SWIG_IsOK(res1)) {
4508 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'");
4510 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4512 resultobj = SWIG_Py_Void();
4519 SWIGINTERN PyObject *_wrap_DoubleVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4520 PyObject *resultobj = 0;
4521 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4524 PyObject * obj0 = 0 ;
4525 double *result = 0 ;
4527 if (!PyArg_ParseTuple(args,(
char *)
"O:DoubleVector_data",&obj0)) SWIG_fail;
4528 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4529 if (!SWIG_IsOK(res1)) {
4530 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_data" "', argument " "1"" of type '" "std::vector< double > *""'");
4532 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4533 result = (
double *)(arg1)->data();
4534 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
4541 SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4542 PyObject *resultobj = 0;
4543 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4546 PyObject * obj0 = 0 ;
4549 if (!PyArg_ParseTuple(args,(
char *)
"O:DoubleVector_size",&obj0)) SWIG_fail;
4550 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4551 if (!SWIG_IsOK(res1)) {
4552 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > *""'");
4554 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4555 result = (size_t)(arg1)->size();
4556 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4563 SWIGINTERN PyObject *_wrap_DoubleVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4564 PyObject *resultobj = 0;
4565 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4571 PyObject * obj0 = 0 ;
4572 PyObject * obj1 = 0 ;
4575 if (!PyArg_ParseTuple(args,(
char *)
"OO:DoubleVector_at",&obj0,&obj1)) SWIG_fail;
4576 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4577 if (!SWIG_IsOK(res1)) {
4578 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_at" "', argument " "1"" of type '" "std::vector< double > const *""'");
4580 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4581 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4582 if (!SWIG_IsOK(ecode2)) {
4583 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "DoubleVector_at" "', argument " "2"" of type '" "size_t""'");
4585 arg2 =
static_cast< size_t >(val2);
4586 result = (double)((std::vector< double >
const *)arg1)->at(arg2);
4587 resultobj = SWIG_From_double(static_cast< double >(result));
4594 SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4595 PyObject *resultobj = 0;
4596 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4602 PyObject * obj0 = 0 ;
4603 PyObject * obj1 = 0 ;
4605 if (!PyArg_ParseTuple(args,(
char *)
"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail;
4606 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4607 if (!SWIG_IsOK(res1)) {
4608 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
4610 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4611 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4612 if (!SWIG_IsOK(ecode2)) {
4613 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "DoubleVector_resize" "', argument " "2"" of type '" "size_t""'");
4615 arg2 =
static_cast< size_t >(val2);
4616 (arg1)->resize(arg2);
4617 resultobj = SWIG_Py_Void();
4624 SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4625 PyObject *resultobj = 0;
4626 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4627 std::vector< double > *arg2 = 0 ;
4632 PyObject * obj0 = 0 ;
4633 PyObject * obj1 = 0 ;
4635 if (!PyArg_ParseTuple(args,(
char *)
"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail;
4636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4637 if (!SWIG_IsOK(res1)) {
4638 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'");
4640 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4641 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_t, 0 );
4642 if (!SWIG_IsOK(res2)) {
4643 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4646 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4648 arg2 =
reinterpret_cast< std::vector< double > *
>(argp2);
4649 (arg1)->swap(*arg2);
4650 resultobj = SWIG_Py_Void();
4657 SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4658 PyObject *resultobj = 0;
4659 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4662 PyObject * obj0 = 0 ;
4664 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_DoubleVector",&obj0)) SWIG_fail;
4665 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_DISOWN | 0 );
4666 if (!SWIG_IsOK(res1)) {
4667 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'");
4669 arg1 =
reinterpret_cast< std::vector< double > *
>(argp1);
4671 resultobj = SWIG_Py_Void();
4678 SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4680 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
4681 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_t, SWIG_NewClientData(obj));
4682 return SWIG_Py_Void();
4685 SWIGINTERN PyObject *_wrap_new_ByteVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4686 PyObject *resultobj = 0;
4687 std::vector< uint8_t > *result = 0 ;
4689 if (!PyArg_ParseTuple(args,(
char *)
":new_ByteVector")) SWIG_fail;
4690 result = (std::vector< uint8_t > *)
new std::vector< uint8_t >();
4691 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_NEW | 0 );
4698 SWIGINTERN PyObject *_wrap_ByteVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4699 PyObject *resultobj = 0;
4700 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4701 unsigned char arg2 ;
4704 unsigned char val2 ;
4706 PyObject * obj0 = 0 ;
4707 PyObject * obj1 = 0 ;
4709 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVector_push_back",&obj0,&obj1)) SWIG_fail;
4710 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4711 if (!SWIG_IsOK(res1)) {
4712 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_push_back" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4714 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4715 ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
4716 if (!SWIG_IsOK(ecode2)) {
4717 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ByteVector_push_back" "', argument " "2"" of type '" "unsigned char""'");
4719 arg2 =
static_cast< unsigned char >(val2);
4720 (arg1)->push_back(arg2);
4721 resultobj = SWIG_Py_Void();
4728 SWIGINTERN PyObject *_wrap_ByteVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4729 PyObject *resultobj = 0;
4730 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4733 PyObject * obj0 = 0 ;
4735 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVector_clear",&obj0)) SWIG_fail;
4736 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4737 if (!SWIG_IsOK(res1)) {
4738 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_clear" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4740 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4742 resultobj = SWIG_Py_Void();
4749 SWIGINTERN PyObject *_wrap_ByteVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4750 PyObject *resultobj = 0;
4751 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4754 PyObject * obj0 = 0 ;
4755 unsigned char *result = 0 ;
4757 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVector_data",&obj0)) SWIG_fail;
4758 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4759 if (!SWIG_IsOK(res1)) {
4760 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_data" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4762 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4763 result = (
unsigned char *)(arg1)->data();
4764 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
4771 SWIGINTERN PyObject *_wrap_ByteVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4772 PyObject *resultobj = 0;
4773 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4776 PyObject * obj0 = 0 ;
4779 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVector_size",&obj0)) SWIG_fail;
4780 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4781 if (!SWIG_IsOK(res1)) {
4782 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_size" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4784 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4785 result = (size_t)(arg1)->size();
4786 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4793 SWIGINTERN PyObject *_wrap_ByteVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4794 PyObject *resultobj = 0;
4795 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4801 PyObject * obj0 = 0 ;
4802 PyObject * obj1 = 0 ;
4803 unsigned char result;
4805 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVector_at",&obj0,&obj1)) SWIG_fail;
4806 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4807 if (!SWIG_IsOK(res1)) {
4808 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_at" "', argument " "1"" of type '" "std::vector< uint8_t > const *""'");
4810 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4811 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4812 if (!SWIG_IsOK(ecode2)) {
4813 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ByteVector_at" "', argument " "2"" of type '" "size_t""'");
4815 arg2 =
static_cast< size_t >(val2);
4816 result = (
unsigned char)((std::vector< uint8_t >
const *)arg1)->at(arg2);
4817 resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
4824 SWIGINTERN PyObject *_wrap_ByteVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4825 PyObject *resultobj = 0;
4826 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4832 PyObject * obj0 = 0 ;
4833 PyObject * obj1 = 0 ;
4835 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVector_resize",&obj0,&obj1)) SWIG_fail;
4836 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4837 if (!SWIG_IsOK(res1)) {
4838 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_resize" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4840 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4841 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4842 if (!SWIG_IsOK(ecode2)) {
4843 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ByteVector_resize" "', argument " "2"" of type '" "size_t""'");
4845 arg2 =
static_cast< size_t >(val2);
4846 (arg1)->resize(arg2);
4847 resultobj = SWIG_Py_Void();
4854 SWIGINTERN PyObject *_wrap_ByteVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4855 PyObject *resultobj = 0;
4856 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4857 std::vector< unsigned char > *arg2 = 0 ;
4862 PyObject * obj0 = 0 ;
4863 PyObject * obj1 = 0 ;
4865 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVector_swap",&obj0,&obj1)) SWIG_fail;
4866 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4867 if (!SWIG_IsOK(res1)) {
4868 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVector_swap" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4870 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4871 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 );
4872 if (!SWIG_IsOK(res2)) {
4873 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4876 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4878 arg2 =
reinterpret_cast< std::vector< unsigned char > *
>(argp2);
4879 (arg1)->swap(*arg2);
4880 resultobj = SWIG_Py_Void();
4887 SWIGINTERN PyObject *_wrap_delete_ByteVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4888 PyObject *resultobj = 0;
4889 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4892 PyObject * obj0 = 0 ;
4894 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_ByteVector",&obj0)) SWIG_fail;
4895 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_DISOWN | 0 );
4896 if (!SWIG_IsOK(res1)) {
4897 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_ByteVector" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4899 arg1 =
reinterpret_cast< std::vector< uint8_t > *
>(argp1);
4901 resultobj = SWIG_Py_Void();
4908 SWIGINTERN PyObject *ByteVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4910 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
4911 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_NewClientData(obj));
4912 return SWIG_Py_Void();
4915 SWIGINTERN PyObject *_wrap_new_CharVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4916 PyObject *resultobj = 0;
4917 std::vector< char > *result = 0 ;
4919 if (!PyArg_ParseTuple(args,(
char *)
":new_CharVector")) SWIG_fail;
4920 result = (std::vector< char > *)
new std::vector< char >();
4921 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_NEW | 0 );
4928 SWIGINTERN PyObject *_wrap_CharVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4929 PyObject *resultobj = 0;
4930 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4936 PyObject * obj0 = 0 ;
4937 PyObject * obj1 = 0 ;
4939 if (!PyArg_ParseTuple(args,(
char *)
"OO:CharVector_push_back",&obj0,&obj1)) SWIG_fail;
4940 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4941 if (!SWIG_IsOK(res1)) {
4942 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_push_back" "', argument " "1"" of type '" "std::vector< char > *""'");
4944 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
4945 ecode2 = SWIG_AsVal_char(obj1, &val2);
4946 if (!SWIG_IsOK(ecode2)) {
4947 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CharVector_push_back" "', argument " "2"" of type '" "char""'");
4949 arg2 =
static_cast< char >(val2);
4950 (arg1)->push_back(arg2);
4951 resultobj = SWIG_Py_Void();
4958 SWIGINTERN PyObject *_wrap_CharVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4959 PyObject *resultobj = 0;
4960 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4963 PyObject * obj0 = 0 ;
4965 if (!PyArg_ParseTuple(args,(
char *)
"O:CharVector_clear",&obj0)) SWIG_fail;
4966 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4967 if (!SWIG_IsOK(res1)) {
4968 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_clear" "', argument " "1"" of type '" "std::vector< char > *""'");
4970 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
4972 resultobj = SWIG_Py_Void();
4979 SWIGINTERN PyObject *_wrap_CharVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
4980 PyObject *resultobj = 0;
4981 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4984 PyObject * obj0 = 0 ;
4987 if (!PyArg_ParseTuple(args,(
char *)
"O:CharVector_data",&obj0)) SWIG_fail;
4988 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4989 if (!SWIG_IsOK(res1)) {
4990 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_data" "', argument " "1"" of type '" "std::vector< char > *""'");
4992 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
4993 result = (
char *)(arg1)->data();
4994 resultobj = SWIG_FromCharPtr((
const char *)result);
5001 SWIGINTERN PyObject *_wrap_CharVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5002 PyObject *resultobj = 0;
5003 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5006 PyObject * obj0 = 0 ;
5009 if (!PyArg_ParseTuple(args,(
char *)
"O:CharVector_size",&obj0)) SWIG_fail;
5010 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5011 if (!SWIG_IsOK(res1)) {
5012 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_size" "', argument " "1"" of type '" "std::vector< char > *""'");
5014 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
5015 result = (size_t)(arg1)->size();
5016 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5023 SWIGINTERN PyObject *_wrap_CharVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5024 PyObject *resultobj = 0;
5025 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5031 PyObject * obj0 = 0 ;
5032 PyObject * obj1 = 0 ;
5035 if (!PyArg_ParseTuple(args,(
char *)
"OO:CharVector_at",&obj0,&obj1)) SWIG_fail;
5036 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5037 if (!SWIG_IsOK(res1)) {
5038 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_at" "', argument " "1"" of type '" "std::vector< char > const *""'");
5040 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
5041 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5042 if (!SWIG_IsOK(ecode2)) {
5043 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CharVector_at" "', argument " "2"" of type '" "size_t""'");
5045 arg2 =
static_cast< size_t >(val2);
5046 result = (char)((std::vector< char >
const *)arg1)->at(arg2);
5047 resultobj = SWIG_From_char(static_cast< char >(result));
5054 SWIGINTERN PyObject *_wrap_CharVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5055 PyObject *resultobj = 0;
5056 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5062 PyObject * obj0 = 0 ;
5063 PyObject * obj1 = 0 ;
5065 if (!PyArg_ParseTuple(args,(
char *)
"OO:CharVector_resize",&obj0,&obj1)) SWIG_fail;
5066 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5067 if (!SWIG_IsOK(res1)) {
5068 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_resize" "', argument " "1"" of type '" "std::vector< char > *""'");
5070 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
5071 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5072 if (!SWIG_IsOK(ecode2)) {
5073 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CharVector_resize" "', argument " "2"" of type '" "size_t""'");
5075 arg2 =
static_cast< size_t >(val2);
5076 (arg1)->resize(arg2);
5077 resultobj = SWIG_Py_Void();
5084 SWIGINTERN PyObject *_wrap_CharVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5085 PyObject *resultobj = 0;
5086 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5087 std::vector< char > *arg2 = 0 ;
5092 PyObject * obj0 = 0 ;
5093 PyObject * obj1 = 0 ;
5095 if (!PyArg_ParseTuple(args,(
char *)
"OO:CharVector_swap",&obj0,&obj1)) SWIG_fail;
5096 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5097 if (!SWIG_IsOK(res1)) {
5098 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CharVector_swap" "', argument " "1"" of type '" "std::vector< char > *""'");
5100 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
5101 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_char_t, 0 );
5102 if (!SWIG_IsOK(res2)) {
5103 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5106 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5108 arg2 =
reinterpret_cast< std::vector< char > *
>(argp2);
5109 (arg1)->swap(*arg2);
5110 resultobj = SWIG_Py_Void();
5117 SWIGINTERN PyObject *_wrap_delete_CharVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5118 PyObject *resultobj = 0;
5119 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5122 PyObject * obj0 = 0 ;
5124 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_CharVector",&obj0)) SWIG_fail;
5125 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_DISOWN | 0 );
5126 if (!SWIG_IsOK(res1)) {
5127 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_CharVector" "', argument " "1"" of type '" "std::vector< char > *""'");
5129 arg1 =
reinterpret_cast< std::vector< char > *
>(argp1);
5131 resultobj = SWIG_Py_Void();
5138 SWIGINTERN PyObject *CharVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5140 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
5141 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_char_t, SWIG_NewClientData(obj));
5142 return SWIG_Py_Void();
5145 SWIGINTERN PyObject *_wrap_new_Uint64Vector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5146 PyObject *resultobj = 0;
5147 std::vector< unsigned long > *result = 0 ;
5149 if (!PyArg_ParseTuple(args,(
char *)
":new_Uint64Vector")) SWIG_fail;
5150 result = (std::vector< unsigned long > *)
new std::vector< unsigned long >();
5151 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_NEW | 0 );
5158 SWIGINTERN PyObject *_wrap_Uint64Vector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5159 PyObject *resultobj = 0;
5160 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5161 unsigned long arg2 ;
5164 unsigned long val2 ;
5166 PyObject * obj0 = 0 ;
5167 PyObject * obj1 = 0 ;
5169 if (!PyArg_ParseTuple(args,(
char *)
"OO:Uint64Vector_push_back",&obj0,&obj1)) SWIG_fail;
5170 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5171 if (!SWIG_IsOK(res1)) {
5172 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_push_back" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5174 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5175 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
5176 if (!SWIG_IsOK(ecode2)) {
5177 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Uint64Vector_push_back" "', argument " "2"" of type '" "unsigned long""'");
5179 arg2 =
static_cast< unsigned long >(val2);
5180 (arg1)->push_back(arg2);
5181 resultobj = SWIG_Py_Void();
5188 SWIGINTERN PyObject *_wrap_Uint64Vector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5189 PyObject *resultobj = 0;
5190 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5193 PyObject * obj0 = 0 ;
5195 if (!PyArg_ParseTuple(args,(
char *)
"O:Uint64Vector_clear",&obj0)) SWIG_fail;
5196 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5197 if (!SWIG_IsOK(res1)) {
5198 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_clear" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5200 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5202 resultobj = SWIG_Py_Void();
5209 SWIGINTERN PyObject *_wrap_Uint64Vector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5210 PyObject *resultobj = 0;
5211 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5214 PyObject * obj0 = 0 ;
5215 unsigned long *result = 0 ;
5217 if (!PyArg_ParseTuple(args,(
char *)
"O:Uint64Vector_data",&obj0)) SWIG_fail;
5218 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5219 if (!SWIG_IsOK(res1)) {
5220 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_data" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5222 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5223 result = (
unsigned long *)(arg1)->data();
5224 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
5231 SWIGINTERN PyObject *_wrap_Uint64Vector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5232 PyObject *resultobj = 0;
5233 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5236 PyObject * obj0 = 0 ;
5239 if (!PyArg_ParseTuple(args,(
char *)
"O:Uint64Vector_size",&obj0)) SWIG_fail;
5240 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5241 if (!SWIG_IsOK(res1)) {
5242 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_size" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5244 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5245 result = (size_t)(arg1)->size();
5246 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5253 SWIGINTERN PyObject *_wrap_Uint64Vector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5254 PyObject *resultobj = 0;
5255 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5261 PyObject * obj0 = 0 ;
5262 PyObject * obj1 = 0 ;
5263 unsigned long result;
5265 if (!PyArg_ParseTuple(args,(
char *)
"OO:Uint64Vector_at",&obj0,&obj1)) SWIG_fail;
5266 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5267 if (!SWIG_IsOK(res1)) {
5268 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_at" "', argument " "1"" of type '" "std::vector< unsigned long > const *""'");
5270 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5271 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5272 if (!SWIG_IsOK(ecode2)) {
5273 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Uint64Vector_at" "', argument " "2"" of type '" "size_t""'");
5275 arg2 =
static_cast< size_t >(val2);
5276 result = (
unsigned long)((std::vector< unsigned long >
const *)arg1)->at(arg2);
5277 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
5284 SWIGINTERN PyObject *_wrap_Uint64Vector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5285 PyObject *resultobj = 0;
5286 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5292 PyObject * obj0 = 0 ;
5293 PyObject * obj1 = 0 ;
5295 if (!PyArg_ParseTuple(args,(
char *)
"OO:Uint64Vector_resize",&obj0,&obj1)) SWIG_fail;
5296 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5297 if (!SWIG_IsOK(res1)) {
5298 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_resize" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5300 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5301 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5302 if (!SWIG_IsOK(ecode2)) {
5303 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Uint64Vector_resize" "', argument " "2"" of type '" "size_t""'");
5305 arg2 =
static_cast< size_t >(val2);
5306 (arg1)->resize(arg2);
5307 resultobj = SWIG_Py_Void();
5314 SWIGINTERN PyObject *_wrap_Uint64Vector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5315 PyObject *resultobj = 0;
5316 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5317 std::vector< unsigned long > *arg2 = 0 ;
5322 PyObject * obj0 = 0 ;
5323 PyObject * obj1 = 0 ;
5325 if (!PyArg_ParseTuple(args,(
char *)
"OO:Uint64Vector_swap",&obj0,&obj1)) SWIG_fail;
5326 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5327 if (!SWIG_IsOK(res1)) {
5328 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Uint64Vector_swap" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5330 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5331 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 );
5332 if (!SWIG_IsOK(res2)) {
5333 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5336 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5338 arg2 =
reinterpret_cast< std::vector< unsigned long > *
>(argp2);
5339 (arg1)->swap(*arg2);
5340 resultobj = SWIG_Py_Void();
5347 SWIGINTERN PyObject *_wrap_delete_Uint64Vector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5348 PyObject *resultobj = 0;
5349 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5352 PyObject * obj0 = 0 ;
5354 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_Uint64Vector",&obj0)) SWIG_fail;
5355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_DISOWN | 0 );
5356 if (!SWIG_IsOK(res1)) {
5357 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_Uint64Vector" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5359 arg1 =
reinterpret_cast< std::vector< unsigned long > *
>(argp1);
5361 resultobj = SWIG_Py_Void();
5368 SWIGINTERN PyObject *Uint64Vector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5370 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
5371 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_NewClientData(obj));
5372 return SWIG_Py_Void();
5375 SWIGINTERN PyObject *_wrap_new_LongVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5376 PyObject *resultobj = 0;
5377 std::vector< long > *result = 0 ;
5379 if (!PyArg_ParseTuple(args,(
char *)
":new_LongVector")) SWIG_fail;
5380 result = (std::vector< long > *)
new std::vector< long >();
5381 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_NEW | 0 );
5388 SWIGINTERN PyObject *_wrap_LongVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5389 PyObject *resultobj = 0;
5390 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5396 PyObject * obj0 = 0 ;
5397 PyObject * obj1 = 0 ;
5399 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVector_push_back",&obj0,&obj1)) SWIG_fail;
5400 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5401 if (!SWIG_IsOK(res1)) {
5402 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_push_back" "', argument " "1"" of type '" "std::vector< long > *""'");
5404 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5405 ecode2 = SWIG_AsVal_long(obj1, &val2);
5406 if (!SWIG_IsOK(ecode2)) {
5407 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LongVector_push_back" "', argument " "2"" of type '" "long""'");
5409 arg2 =
static_cast< long >(val2);
5410 (arg1)->push_back(arg2);
5411 resultobj = SWIG_Py_Void();
5418 SWIGINTERN PyObject *_wrap_LongVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5419 PyObject *resultobj = 0;
5420 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5423 PyObject * obj0 = 0 ;
5425 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVector_clear",&obj0)) SWIG_fail;
5426 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5427 if (!SWIG_IsOK(res1)) {
5428 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_clear" "', argument " "1"" of type '" "std::vector< long > *""'");
5430 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5432 resultobj = SWIG_Py_Void();
5439 SWIGINTERN PyObject *_wrap_LongVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5440 PyObject *resultobj = 0;
5441 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5444 PyObject * obj0 = 0 ;
5447 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVector_data",&obj0)) SWIG_fail;
5448 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5449 if (!SWIG_IsOK(res1)) {
5450 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_data" "', argument " "1"" of type '" "std::vector< long > *""'");
5452 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5453 result = (
long *)(arg1)->data();
5454 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
5461 SWIGINTERN PyObject *_wrap_LongVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5462 PyObject *resultobj = 0;
5463 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5466 PyObject * obj0 = 0 ;
5469 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVector_size",&obj0)) SWIG_fail;
5470 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5471 if (!SWIG_IsOK(res1)) {
5472 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_size" "', argument " "1"" of type '" "std::vector< long > *""'");
5474 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5475 result = (size_t)(arg1)->size();
5476 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5483 SWIGINTERN PyObject *_wrap_LongVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5484 PyObject *resultobj = 0;
5485 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5491 PyObject * obj0 = 0 ;
5492 PyObject * obj1 = 0 ;
5495 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVector_at",&obj0,&obj1)) SWIG_fail;
5496 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5497 if (!SWIG_IsOK(res1)) {
5498 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_at" "', argument " "1"" of type '" "std::vector< long > const *""'");
5500 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5501 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5502 if (!SWIG_IsOK(ecode2)) {
5503 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LongVector_at" "', argument " "2"" of type '" "size_t""'");
5505 arg2 =
static_cast< size_t >(val2);
5506 result = (long)((std::vector< long >
const *)arg1)->at(arg2);
5507 resultobj = SWIG_From_long(static_cast< long >(result));
5514 SWIGINTERN PyObject *_wrap_LongVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5515 PyObject *resultobj = 0;
5516 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5522 PyObject * obj0 = 0 ;
5523 PyObject * obj1 = 0 ;
5525 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVector_resize",&obj0,&obj1)) SWIG_fail;
5526 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5527 if (!SWIG_IsOK(res1)) {
5528 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_resize" "', argument " "1"" of type '" "std::vector< long > *""'");
5530 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5531 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5532 if (!SWIG_IsOK(ecode2)) {
5533 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LongVector_resize" "', argument " "2"" of type '" "size_t""'");
5535 arg2 =
static_cast< size_t >(val2);
5536 (arg1)->resize(arg2);
5537 resultobj = SWIG_Py_Void();
5544 SWIGINTERN PyObject *_wrap_LongVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5545 PyObject *resultobj = 0;
5546 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5547 std::vector< long > *arg2 = 0 ;
5552 PyObject * obj0 = 0 ;
5553 PyObject * obj1 = 0 ;
5555 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVector_swap",&obj0,&obj1)) SWIG_fail;
5556 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5557 if (!SWIG_IsOK(res1)) {
5558 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVector_swap" "', argument " "1"" of type '" "std::vector< long > *""'");
5560 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5561 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 );
5562 if (!SWIG_IsOK(res2)) {
5563 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5566 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5568 arg2 =
reinterpret_cast< std::vector< long > *
>(argp2);
5569 (arg1)->swap(*arg2);
5570 resultobj = SWIG_Py_Void();
5577 SWIGINTERN PyObject *_wrap_delete_LongVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5578 PyObject *resultobj = 0;
5579 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5582 PyObject * obj0 = 0 ;
5584 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_LongVector",&obj0)) SWIG_fail;
5585 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_DISOWN | 0 );
5586 if (!SWIG_IsOK(res1)) {
5587 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_LongVector" "', argument " "1"" of type '" "std::vector< long > *""'");
5589 arg1 =
reinterpret_cast< std::vector< long > *
>(argp1);
5591 resultobj = SWIG_Py_Void();
5598 SWIGINTERN PyObject *LongVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5600 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
5601 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_long_t, SWIG_NewClientData(obj));
5602 return SWIG_Py_Void();
5605 SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5606 PyObject *resultobj = 0;
5607 std::vector< int > *result = 0 ;
5609 if (!PyArg_ParseTuple(args,(
char *)
":new_IntVector")) SWIG_fail;
5610 result = (std::vector< int > *)
new std::vector< int >();
5611 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 );
5618 SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5619 PyObject *resultobj = 0;
5620 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5626 PyObject * obj0 = 0 ;
5627 PyObject * obj1 = 0 ;
5629 if (!PyArg_ParseTuple(args,(
char *)
"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail;
5630 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5631 if (!SWIG_IsOK(res1)) {
5632 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
5634 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5635 ecode2 = SWIG_AsVal_int(obj1, &val2);
5636 if (!SWIG_IsOK(ecode2)) {
5637 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IntVector_push_back" "', argument " "2"" of type '" "int""'");
5639 arg2 =
static_cast< int >(val2);
5640 (arg1)->push_back(arg2);
5641 resultobj = SWIG_Py_Void();
5648 SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5649 PyObject *resultobj = 0;
5650 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5653 PyObject * obj0 = 0 ;
5655 if (!PyArg_ParseTuple(args,(
char *)
"O:IntVector_clear",&obj0)) SWIG_fail;
5656 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5657 if (!SWIG_IsOK(res1)) {
5658 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
5660 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5662 resultobj = SWIG_Py_Void();
5669 SWIGINTERN PyObject *_wrap_IntVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5670 PyObject *resultobj = 0;
5671 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5674 PyObject * obj0 = 0 ;
5677 if (!PyArg_ParseTuple(args,(
char *)
"O:IntVector_data",&obj0)) SWIG_fail;
5678 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5679 if (!SWIG_IsOK(res1)) {
5680 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_data" "', argument " "1"" of type '" "std::vector< int > *""'");
5682 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5683 result = (
int *)(arg1)->data();
5684 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
5691 SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5692 PyObject *resultobj = 0;
5693 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5696 PyObject * obj0 = 0 ;
5699 if (!PyArg_ParseTuple(args,(
char *)
"O:IntVector_size",&obj0)) SWIG_fail;
5700 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5701 if (!SWIG_IsOK(res1)) {
5702 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > *""'");
5704 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5705 result = (size_t)(arg1)->size();
5706 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5713 SWIGINTERN PyObject *_wrap_IntVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5714 PyObject *resultobj = 0;
5715 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5721 PyObject * obj0 = 0 ;
5722 PyObject * obj1 = 0 ;
5725 if (!PyArg_ParseTuple(args,(
char *)
"OO:IntVector_at",&obj0,&obj1)) SWIG_fail;
5726 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5727 if (!SWIG_IsOK(res1)) {
5728 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_at" "', argument " "1"" of type '" "std::vector< int > const *""'");
5730 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5731 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5732 if (!SWIG_IsOK(ecode2)) {
5733 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IntVector_at" "', argument " "2"" of type '" "size_t""'");
5735 arg2 =
static_cast< size_t >(val2);
5736 result = (int)((std::vector< int >
const *)arg1)->at(arg2);
5737 resultobj = SWIG_From_int(static_cast< int >(result));
5744 SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5745 PyObject *resultobj = 0;
5746 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5752 PyObject * obj0 = 0 ;
5753 PyObject * obj1 = 0 ;
5755 if (!PyArg_ParseTuple(args,(
char *)
"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail;
5756 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5757 if (!SWIG_IsOK(res1)) {
5758 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
5760 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5761 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5762 if (!SWIG_IsOK(ecode2)) {
5763 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IntVector_resize" "', argument " "2"" of type '" "size_t""'");
5765 arg2 =
static_cast< size_t >(val2);
5766 (arg1)->resize(arg2);
5767 resultobj = SWIG_Py_Void();
5774 SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5775 PyObject *resultobj = 0;
5776 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5777 std::vector< int > *arg2 = 0 ;
5782 PyObject * obj0 = 0 ;
5783 PyObject * obj1 = 0 ;
5785 if (!PyArg_ParseTuple(args,(
char *)
"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail;
5786 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5787 if (!SWIG_IsOK(res1)) {
5788 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
5790 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5791 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 );
5792 if (!SWIG_IsOK(res2)) {
5793 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5796 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5798 arg2 =
reinterpret_cast< std::vector< int > *
>(argp2);
5799 (arg1)->swap(*arg2);
5800 resultobj = SWIG_Py_Void();
5807 SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5808 PyObject *resultobj = 0;
5809 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5812 PyObject * obj0 = 0 ;
5814 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_IntVector",&obj0)) SWIG_fail;
5815 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN | 0 );
5816 if (!SWIG_IsOK(res1)) {
5817 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'");
5819 arg1 =
reinterpret_cast< std::vector< int > *
>(argp1);
5821 resultobj = SWIG_Py_Void();
5828 SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5830 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
5831 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_t, SWIG_NewClientData(obj));
5832 return SWIG_Py_Void();
5835 SWIGINTERN PyObject *_wrap_new_VectorTransformVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5836 PyObject *resultobj = 0;
5837 std::vector< faiss::VectorTransform * > *result = 0 ;
5839 if (!PyArg_ParseTuple(args,(
char *)
":new_VectorTransformVector")) SWIG_fail;
5840 result = (std::vector< faiss::VectorTransform * > *)
new std::vector< faiss::VectorTransform * >();
5841 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_NEW | 0 );
5848 SWIGINTERN PyObject *_wrap_VectorTransformVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5849 PyObject *resultobj = 0;
5850 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5856 PyObject * obj0 = 0 ;
5857 PyObject * obj1 = 0 ;
5859 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransformVector_push_back",&obj0,&obj1)) SWIG_fail;
5860 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5861 if (!SWIG_IsOK(res1)) {
5862 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5864 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5865 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5866 if (!SWIG_IsOK(res2)) {
5867 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "VectorTransformVector_push_back" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
5870 (arg1)->push_back(arg2);
5871 resultobj = SWIG_Py_Void();
5878 SWIGINTERN PyObject *_wrap_VectorTransformVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5879 PyObject *resultobj = 0;
5880 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5883 PyObject * obj0 = 0 ;
5885 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransformVector_clear",&obj0)) SWIG_fail;
5886 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5887 if (!SWIG_IsOK(res1)) {
5888 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_clear" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5890 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5892 resultobj = SWIG_Py_Void();
5899 SWIGINTERN PyObject *_wrap_VectorTransformVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5900 PyObject *resultobj = 0;
5901 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5904 PyObject * obj0 = 0 ;
5907 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransformVector_data",&obj0)) SWIG_fail;
5908 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5909 if (!SWIG_IsOK(res1)) {
5910 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_data" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5912 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5914 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__VectorTransform, 0 | 0 );
5921 SWIGINTERN PyObject *_wrap_VectorTransformVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5922 PyObject *resultobj = 0;
5923 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5926 PyObject * obj0 = 0 ;
5929 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransformVector_size",&obj0)) SWIG_fail;
5930 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5931 if (!SWIG_IsOK(res1)) {
5932 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_size" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5934 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5935 result = (size_t)(arg1)->size();
5936 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5943 SWIGINTERN PyObject *_wrap_VectorTransformVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5944 PyObject *resultobj = 0;
5945 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5951 PyObject * obj0 = 0 ;
5952 PyObject * obj1 = 0 ;
5955 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransformVector_at",&obj0,&obj1)) SWIG_fail;
5956 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5957 if (!SWIG_IsOK(res1)) {
5958 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_at" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > const *""'");
5960 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5961 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5962 if (!SWIG_IsOK(ecode2)) {
5963 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransformVector_at" "', argument " "2"" of type '" "size_t""'");
5965 arg2 =
static_cast< size_t >(val2);
5967 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5974 SWIGINTERN PyObject *_wrap_VectorTransformVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
5975 PyObject *resultobj = 0;
5976 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5982 PyObject * obj0 = 0 ;
5983 PyObject * obj1 = 0 ;
5985 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransformVector_resize",&obj0,&obj1)) SWIG_fail;
5986 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5987 if (!SWIG_IsOK(res1)) {
5988 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_resize" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5990 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
5991 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5992 if (!SWIG_IsOK(ecode2)) {
5993 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransformVector_resize" "', argument " "2"" of type '" "size_t""'");
5995 arg2 =
static_cast< size_t >(val2);
5996 (arg1)->resize(arg2);
5997 resultobj = SWIG_Py_Void();
6004 SWIGINTERN PyObject *_wrap_VectorTransformVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6005 PyObject *resultobj = 0;
6006 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
6007 std::vector< faiss::VectorTransform * > *arg2 = 0 ;
6012 PyObject * obj0 = 0 ;
6013 PyObject * obj1 = 0 ;
6015 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransformVector_swap",&obj0,&obj1)) SWIG_fail;
6016 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
6017 if (!SWIG_IsOK(res1)) {
6018 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransformVector_swap" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6020 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
6021 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 );
6022 if (!SWIG_IsOK(res2)) {
6023 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
6026 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
6028 arg2 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp2);
6029 (arg1)->swap(*arg2);
6030 resultobj = SWIG_Py_Void();
6037 SWIGINTERN PyObject *_wrap_delete_VectorTransformVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6038 PyObject *resultobj = 0;
6039 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
6042 PyObject * obj0 = 0 ;
6044 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_VectorTransformVector",&obj0)) SWIG_fail;
6045 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_DISOWN | 0 );
6046 if (!SWIG_IsOK(res1)) {
6047 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_VectorTransformVector" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6049 arg1 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp1);
6051 resultobj = SWIG_Py_Void();
6058 SWIGINTERN PyObject *VectorTransformVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6060 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
6061 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_NewClientData(obj));
6062 return SWIG_Py_Void();
6065 SWIGINTERN PyObject *_wrap_new_OperatingPointVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6066 PyObject *resultobj = 0;
6067 std::vector< faiss::OperatingPoint > *result = 0 ;
6069 if (!PyArg_ParseTuple(args,(
char *)
":new_OperatingPointVector")) SWIG_fail;
6070 result = (std::vector< faiss::OperatingPoint > *)
new std::vector< faiss::OperatingPoint >();
6071 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_NEW | 0 );
6078 SWIGINTERN PyObject *_wrap_OperatingPointVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6079 PyObject *resultobj = 0;
6080 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6086 PyObject * obj0 = 0 ;
6087 PyObject * obj1 = 0 ;
6089 if (!PyArg_ParseTuple(args,(
char *)
"OO:OperatingPointVector_push_back",&obj0,&obj1)) SWIG_fail;
6090 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6091 if (!SWIG_IsOK(res1)) {
6092 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6094 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6096 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoint, 0 | 0);
6097 if (!SWIG_IsOK(res2)) {
6098 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6101 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6105 if (SWIG_IsNewObj(res2))
delete temp;
6108 (arg1)->push_back(arg2);
6109 resultobj = SWIG_Py_Void();
6116 SWIGINTERN PyObject *_wrap_OperatingPointVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6117 PyObject *resultobj = 0;
6118 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6121 PyObject * obj0 = 0 ;
6123 if (!PyArg_ParseTuple(args,(
char *)
"O:OperatingPointVector_clear",&obj0)) SWIG_fail;
6124 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6125 if (!SWIG_IsOK(res1)) {
6126 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_clear" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6128 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6130 resultobj = SWIG_Py_Void();
6137 SWIGINTERN PyObject *_wrap_OperatingPointVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6138 PyObject *resultobj = 0;
6139 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6142 PyObject * obj0 = 0 ;
6145 if (!PyArg_ParseTuple(args,(
char *)
"O:OperatingPointVector_data",&obj0)) SWIG_fail;
6146 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6147 if (!SWIG_IsOK(res1)) {
6148 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_data" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6150 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6152 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
6159 SWIGINTERN PyObject *_wrap_OperatingPointVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6160 PyObject *resultobj = 0;
6161 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6164 PyObject * obj0 = 0 ;
6167 if (!PyArg_ParseTuple(args,(
char *)
"O:OperatingPointVector_size",&obj0)) SWIG_fail;
6168 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6169 if (!SWIG_IsOK(res1)) {
6170 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_size" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6172 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6173 result = (size_t)(arg1)->size();
6174 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6181 SWIGINTERN PyObject *_wrap_OperatingPointVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6182 PyObject *resultobj = 0;
6183 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6189 PyObject * obj0 = 0 ;
6190 PyObject * obj1 = 0 ;
6193 if (!PyArg_ParseTuple(args,(
char *)
"OO:OperatingPointVector_at",&obj0,&obj1)) SWIG_fail;
6194 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6195 if (!SWIG_IsOK(res1)) {
6196 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_at" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > const *""'");
6198 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6199 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6200 if (!SWIG_IsOK(ecode2)) {
6201 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OperatingPointVector_at" "', argument " "2"" of type '" "size_t""'");
6203 arg2 =
static_cast< size_t >(val2);
6204 result = ((std::vector< faiss::OperatingPoint >
const *)arg1)->at(arg2);
6205 resultobj = SWIG_NewPointerObj((
new faiss::OperatingPoint(static_cast< const faiss::OperatingPoint& >(result))), SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_OWN | 0 );
6212 SWIGINTERN PyObject *_wrap_OperatingPointVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6213 PyObject *resultobj = 0;
6214 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6220 PyObject * obj0 = 0 ;
6221 PyObject * obj1 = 0 ;
6223 if (!PyArg_ParseTuple(args,(
char *)
"OO:OperatingPointVector_resize",&obj0,&obj1)) SWIG_fail;
6224 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6225 if (!SWIG_IsOK(res1)) {
6226 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_resize" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6228 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6229 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6230 if (!SWIG_IsOK(ecode2)) {
6231 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OperatingPointVector_resize" "', argument " "2"" of type '" "size_t""'");
6233 arg2 =
static_cast< size_t >(val2);
6234 (arg1)->resize(arg2);
6235 resultobj = SWIG_Py_Void();
6242 SWIGINTERN PyObject *_wrap_OperatingPointVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6243 PyObject *resultobj = 0;
6244 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6245 std::vector< faiss::OperatingPoint > *arg2 = 0 ;
6250 PyObject * obj0 = 0 ;
6251 PyObject * obj1 = 0 ;
6253 if (!PyArg_ParseTuple(args,(
char *)
"OO:OperatingPointVector_swap",&obj0,&obj1)) SWIG_fail;
6254 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6255 if (!SWIG_IsOK(res1)) {
6256 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OperatingPointVector_swap" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6258 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6259 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 );
6260 if (!SWIG_IsOK(res2)) {
6261 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6264 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6266 arg2 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp2);
6267 (arg1)->swap(*arg2);
6268 resultobj = SWIG_Py_Void();
6275 SWIGINTERN PyObject *_wrap_delete_OperatingPointVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6276 PyObject *resultobj = 0;
6277 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6280 PyObject * obj0 = 0 ;
6282 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_OperatingPointVector",&obj0)) SWIG_fail;
6283 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_DISOWN | 0 );
6284 if (!SWIG_IsOK(res1)) {
6285 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_OperatingPointVector" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6287 arg1 =
reinterpret_cast< std::vector< faiss::OperatingPoint > *
>(argp1);
6289 resultobj = SWIG_Py_Void();
6296 SWIGINTERN PyObject *OperatingPointVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6298 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
6299 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_NewClientData(obj));
6300 return SWIG_Py_Void();
6303 SWIGINTERN PyObject *_wrap_new_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6304 PyObject *resultobj = 0;
6305 std::vector< faiss::InvertedLists * > *result = 0 ;
6307 if (!PyArg_ParseTuple(args,(
char *)
":new_InvertedListsPtrVector")) SWIG_fail;
6308 result = (std::vector< faiss::InvertedLists * > *)
new std::vector< faiss::InvertedLists * >();
6309 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_NEW | 0 );
6316 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6317 PyObject *resultobj = 0;
6318 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6324 PyObject * obj0 = 0 ;
6325 PyObject * obj1 = 0 ;
6327 if (!PyArg_ParseTuple(args,(
char *)
"OO:InvertedListsPtrVector_push_back",&obj0,&obj1)) SWIG_fail;
6328 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6329 if (!SWIG_IsOK(res1)) {
6330 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6332 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6333 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6334 if (!SWIG_IsOK(res2)) {
6335 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "InvertedListsPtrVector_push_back" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
6338 (arg1)->push_back(arg2);
6339 resultobj = SWIG_Py_Void();
6346 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6347 PyObject *resultobj = 0;
6348 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6351 PyObject * obj0 = 0 ;
6353 if (!PyArg_ParseTuple(args,(
char *)
"O:InvertedListsPtrVector_clear",&obj0)) SWIG_fail;
6354 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6355 if (!SWIG_IsOK(res1)) {
6356 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_clear" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6358 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6360 resultobj = SWIG_Py_Void();
6367 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6368 PyObject *resultobj = 0;
6369 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6372 PyObject * obj0 = 0 ;
6375 if (!PyArg_ParseTuple(args,(
char *)
"O:InvertedListsPtrVector_data",&obj0)) SWIG_fail;
6376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6377 if (!SWIG_IsOK(res1)) {
6378 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_data" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6380 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6382 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
6389 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6390 PyObject *resultobj = 0;
6391 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6394 PyObject * obj0 = 0 ;
6397 if (!PyArg_ParseTuple(args,(
char *)
"O:InvertedListsPtrVector_size",&obj0)) SWIG_fail;
6398 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6399 if (!SWIG_IsOK(res1)) {
6400 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_size" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6402 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6403 result = (size_t)(arg1)->size();
6404 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6411 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6412 PyObject *resultobj = 0;
6413 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6419 PyObject * obj0 = 0 ;
6420 PyObject * obj1 = 0 ;
6423 if (!PyArg_ParseTuple(args,(
char *)
"OO:InvertedListsPtrVector_at",&obj0,&obj1)) SWIG_fail;
6424 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6425 if (!SWIG_IsOK(res1)) {
6426 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_at" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > const *""'");
6428 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6429 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6430 if (!SWIG_IsOK(ecode2)) {
6431 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "InvertedListsPtrVector_at" "', argument " "2"" of type '" "size_t""'");
6433 arg2 =
static_cast< size_t >(val2);
6434 result = (
faiss::InvertedLists *)((std::vector< faiss::InvertedLists * >
const *)arg1)->at(arg2);
6435 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6442 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6443 PyObject *resultobj = 0;
6444 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6450 PyObject * obj0 = 0 ;
6451 PyObject * obj1 = 0 ;
6453 if (!PyArg_ParseTuple(args,(
char *)
"OO:InvertedListsPtrVector_resize",&obj0,&obj1)) SWIG_fail;
6454 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6455 if (!SWIG_IsOK(res1)) {
6456 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_resize" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6458 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6459 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6460 if (!SWIG_IsOK(ecode2)) {
6461 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "InvertedListsPtrVector_resize" "', argument " "2"" of type '" "size_t""'");
6463 arg2 =
static_cast< size_t >(val2);
6464 (arg1)->resize(arg2);
6465 resultobj = SWIG_Py_Void();
6472 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6473 PyObject *resultobj = 0;
6474 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6475 std::vector< faiss::InvertedLists * > *arg2 = 0 ;
6480 PyObject * obj0 = 0 ;
6481 PyObject * obj1 = 0 ;
6483 if (!PyArg_ParseTuple(args,(
char *)
"OO:InvertedListsPtrVector_swap",&obj0,&obj1)) SWIG_fail;
6484 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6485 if (!SWIG_IsOK(res1)) {
6486 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "InvertedListsPtrVector_swap" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6488 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6489 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 );
6490 if (!SWIG_IsOK(res2)) {
6491 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6494 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6496 arg2 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp2);
6497 (arg1)->swap(*arg2);
6498 resultobj = SWIG_Py_Void();
6505 SWIGINTERN PyObject *_wrap_delete_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6506 PyObject *resultobj = 0;
6507 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6510 PyObject * obj0 = 0 ;
6512 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_InvertedListsPtrVector",&obj0)) SWIG_fail;
6513 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_DISOWN | 0 );
6514 if (!SWIG_IsOK(res1)) {
6515 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_InvertedListsPtrVector" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6517 arg1 =
reinterpret_cast< std::vector< faiss::InvertedLists * > *
>(argp1);
6519 resultobj = SWIG_Py_Void();
6526 SWIGINTERN PyObject *InvertedListsPtrVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6528 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
6529 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_NewClientData(obj));
6530 return SWIG_Py_Void();
6533 SWIGINTERN PyObject *_wrap_new_FloatVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6534 PyObject *resultobj = 0;
6535 std::vector< std::vector< float > > *result = 0 ;
6537 if (!PyArg_ParseTuple(args,(
char *)
":new_FloatVectorVector")) SWIG_fail;
6538 result = (std::vector< std::vector< float > > *)
new std::vector< std::vector< float > >();
6539 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_NEW | 0 );
6546 SWIGINTERN PyObject *_wrap_FloatVectorVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6547 PyObject *resultobj = 0;
6548 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6549 std::vector< float > arg2 ;
6554 PyObject * obj0 = 0 ;
6555 PyObject * obj1 = 0 ;
6557 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6558 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6559 if (!SWIG_IsOK(res1)) {
6560 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6562 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6564 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 | 0);
6565 if (!SWIG_IsOK(res2)) {
6566 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6569 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6571 std::vector< float > * temp =
reinterpret_cast< std::vector< float > *
>(argp2);
6573 if (SWIG_IsNewObj(res2))
delete temp;
6576 (arg1)->push_back(arg2);
6577 resultobj = SWIG_Py_Void();
6584 SWIGINTERN PyObject *_wrap_FloatVectorVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6585 PyObject *resultobj = 0;
6586 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6589 PyObject * obj0 = 0 ;
6591 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVectorVector_clear",&obj0)) SWIG_fail;
6592 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6593 if (!SWIG_IsOK(res1)) {
6594 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6596 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6598 resultobj = SWIG_Py_Void();
6605 SWIGINTERN PyObject *_wrap_FloatVectorVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6606 PyObject *resultobj = 0;
6607 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6610 PyObject * obj0 = 0 ;
6611 std::vector< float > *result = 0 ;
6613 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVectorVector_data",&obj0)) SWIG_fail;
6614 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6615 if (!SWIG_IsOK(res1)) {
6616 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6618 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6619 result = (std::vector< float > *)(arg1)->data();
6620 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
6627 SWIGINTERN PyObject *_wrap_FloatVectorVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6628 PyObject *resultobj = 0;
6629 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6632 PyObject * obj0 = 0 ;
6635 if (!PyArg_ParseTuple(args,(
char *)
"O:FloatVectorVector_size",&obj0)) SWIG_fail;
6636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6637 if (!SWIG_IsOK(res1)) {
6638 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6640 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6641 result = (size_t)(arg1)->size();
6642 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6649 SWIGINTERN PyObject *_wrap_FloatVectorVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6650 PyObject *resultobj = 0;
6651 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6657 PyObject * obj0 = 0 ;
6658 PyObject * obj1 = 0 ;
6659 std::vector< float > result;
6661 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVectorVector_at",&obj0,&obj1)) SWIG_fail;
6662 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6663 if (!SWIG_IsOK(res1)) {
6664 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< float > > const *""'");
6666 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6667 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6668 if (!SWIG_IsOK(ecode2)) {
6669 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "FloatVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6671 arg2 =
static_cast< size_t >(val2);
6672 result = ((std::vector< std::vector< float > >
const *)arg1)->at(arg2);
6673 resultobj = SWIG_NewPointerObj((
new std::vector< float >(
static_cast< const std::vector< float >&
>(result))), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_OWN | 0 );
6680 SWIGINTERN PyObject *_wrap_FloatVectorVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6681 PyObject *resultobj = 0;
6682 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6688 PyObject * obj0 = 0 ;
6689 PyObject * obj1 = 0 ;
6691 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6692 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6693 if (!SWIG_IsOK(res1)) {
6694 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6696 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6697 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6698 if (!SWIG_IsOK(ecode2)) {
6699 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "FloatVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6701 arg2 =
static_cast< size_t >(val2);
6702 (arg1)->resize(arg2);
6703 resultobj = SWIG_Py_Void();
6710 SWIGINTERN PyObject *_wrap_FloatVectorVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6711 PyObject *resultobj = 0;
6712 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6713 std::vector< std::vector< float > > *arg2 = 0 ;
6718 PyObject * obj0 = 0 ;
6719 PyObject * obj1 = 0 ;
6721 if (!PyArg_ParseTuple(args,(
char *)
"OO:FloatVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6722 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6723 if (!SWIG_IsOK(res1)) {
6724 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "FloatVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6726 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6727 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 );
6728 if (!SWIG_IsOK(res2)) {
6729 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6732 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6734 arg2 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp2);
6735 (arg1)->swap(*arg2);
6736 resultobj = SWIG_Py_Void();
6743 SWIGINTERN PyObject *_wrap_delete_FloatVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6744 PyObject *resultobj = 0;
6745 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6748 PyObject * obj0 = 0 ;
6750 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_FloatVectorVector",&obj0)) SWIG_fail;
6751 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_DISOWN | 0 );
6752 if (!SWIG_IsOK(res1)) {
6753 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_FloatVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6755 arg1 =
reinterpret_cast< std::vector< std::vector< float >
> * >(argp1);
6757 resultobj = SWIG_Py_Void();
6764 SWIGINTERN PyObject *FloatVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6766 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
6767 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_NewClientData(obj));
6768 return SWIG_Py_Void();
6771 SWIGINTERN PyObject *_wrap_new_ByteVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6772 PyObject *resultobj = 0;
6773 std::vector< std::vector< unsigned char > > *result = 0 ;
6775 if (!PyArg_ParseTuple(args,(
char *)
":new_ByteVectorVector")) SWIG_fail;
6776 result = (std::vector< std::vector< unsigned char > > *)
new std::vector< std::vector< unsigned char > >();
6777 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_NEW | 0 );
6784 SWIGINTERN PyObject *_wrap_ByteVectorVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6785 PyObject *resultobj = 0;
6786 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6787 std::vector< unsigned char > arg2 ;
6792 PyObject * obj0 = 0 ;
6793 PyObject * obj1 = 0 ;
6795 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6796 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6797 if (!SWIG_IsOK(res1)) {
6798 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6800 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6802 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0);
6803 if (!SWIG_IsOK(res2)) {
6804 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6807 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6809 std::vector< unsigned char > * temp =
reinterpret_cast< std::vector< unsigned char > *
>(argp2);
6811 if (SWIG_IsNewObj(res2))
delete temp;
6814 (arg1)->push_back(arg2);
6815 resultobj = SWIG_Py_Void();
6822 SWIGINTERN PyObject *_wrap_ByteVectorVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6823 PyObject *resultobj = 0;
6824 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6827 PyObject * obj0 = 0 ;
6829 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVectorVector_clear",&obj0)) SWIG_fail;
6830 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6831 if (!SWIG_IsOK(res1)) {
6832 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6834 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6836 resultobj = SWIG_Py_Void();
6843 SWIGINTERN PyObject *_wrap_ByteVectorVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6844 PyObject *resultobj = 0;
6845 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6848 PyObject * obj0 = 0 ;
6849 std::vector< unsigned char > *result = 0 ;
6851 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVectorVector_data",&obj0)) SWIG_fail;
6852 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6853 if (!SWIG_IsOK(res1)) {
6854 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6856 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6857 result = (std::vector< unsigned char > *)(arg1)->data();
6858 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
6865 SWIGINTERN PyObject *_wrap_ByteVectorVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6866 PyObject *resultobj = 0;
6867 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6870 PyObject * obj0 = 0 ;
6873 if (!PyArg_ParseTuple(args,(
char *)
"O:ByteVectorVector_size",&obj0)) SWIG_fail;
6874 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6875 if (!SWIG_IsOK(res1)) {
6876 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6878 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6879 result = (size_t)(arg1)->size();
6880 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6887 SWIGINTERN PyObject *_wrap_ByteVectorVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6888 PyObject *resultobj = 0;
6889 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6895 PyObject * obj0 = 0 ;
6896 PyObject * obj1 = 0 ;
6897 std::vector< unsigned char > result;
6899 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVectorVector_at",&obj0,&obj1)) SWIG_fail;
6900 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6901 if (!SWIG_IsOK(res1)) {
6902 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > const *""'");
6904 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6905 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6906 if (!SWIG_IsOK(ecode2)) {
6907 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ByteVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6909 arg2 =
static_cast< size_t >(val2);
6910 result = ((std::vector< std::vector< unsigned char > >
const *)arg1)->at(arg2);
6911 resultobj = SWIG_NewPointerObj((
new std::vector< unsigned char >(
static_cast< const std::vector< unsigned char >&
>(result))), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_OWN | 0 );
6918 SWIGINTERN PyObject *_wrap_ByteVectorVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6919 PyObject *resultobj = 0;
6920 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6926 PyObject * obj0 = 0 ;
6927 PyObject * obj1 = 0 ;
6929 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6930 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6931 if (!SWIG_IsOK(res1)) {
6932 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6934 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6935 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6936 if (!SWIG_IsOK(ecode2)) {
6937 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ByteVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6939 arg2 =
static_cast< size_t >(val2);
6940 (arg1)->resize(arg2);
6941 resultobj = SWIG_Py_Void();
6948 SWIGINTERN PyObject *_wrap_ByteVectorVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6949 PyObject *resultobj = 0;
6950 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6951 std::vector< std::vector< unsigned char > > *arg2 = 0 ;
6956 PyObject * obj0 = 0 ;
6957 PyObject * obj1 = 0 ;
6959 if (!PyArg_ParseTuple(args,(
char *)
"OO:ByteVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6960 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6961 if (!SWIG_IsOK(res1)) {
6962 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ByteVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6964 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6965 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 );
6966 if (!SWIG_IsOK(res2)) {
6967 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6970 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6972 arg2 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp2);
6973 (arg1)->swap(*arg2);
6974 resultobj = SWIG_Py_Void();
6981 SWIGINTERN PyObject *_wrap_delete_ByteVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
6982 PyObject *resultobj = 0;
6983 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6986 PyObject * obj0 = 0 ;
6988 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_ByteVectorVector",&obj0)) SWIG_fail;
6989 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_DISOWN | 0 );
6990 if (!SWIG_IsOK(res1)) {
6991 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_ByteVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6993 arg1 =
reinterpret_cast< std::vector< std::vector< unsigned char >
> * >(argp1);
6995 resultobj = SWIG_Py_Void();
7002 SWIGINTERN PyObject *ByteVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7004 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
7005 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_NewClientData(obj));
7006 return SWIG_Py_Void();
7009 SWIGINTERN PyObject *_wrap_new_LongVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7010 PyObject *resultobj = 0;
7011 std::vector< std::vector< long > > *result = 0 ;
7013 if (!PyArg_ParseTuple(args,(
char *)
":new_LongVectorVector")) SWIG_fail;
7014 result = (std::vector< std::vector< long > > *)
new std::vector< std::vector< long > >();
7015 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_NEW | 0 );
7022 SWIGINTERN PyObject *_wrap_LongVectorVector_push_back(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7023 PyObject *resultobj = 0;
7024 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7025 std::vector< long > arg2 ;
7030 PyObject * obj0 = 0 ;
7031 PyObject * obj1 = 0 ;
7033 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
7034 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7035 if (!SWIG_IsOK(res1)) {
7036 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7038 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7040 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 | 0);
7041 if (!SWIG_IsOK(res2)) {
7042 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7045 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7047 std::vector< long > * temp =
reinterpret_cast< std::vector< long > *
>(argp2);
7049 if (SWIG_IsNewObj(res2))
delete temp;
7052 (arg1)->push_back(arg2);
7053 resultobj = SWIG_Py_Void();
7060 SWIGINTERN PyObject *_wrap_LongVectorVector_clear(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7061 PyObject *resultobj = 0;
7062 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7065 PyObject * obj0 = 0 ;
7067 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVectorVector_clear",&obj0)) SWIG_fail;
7068 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7069 if (!SWIG_IsOK(res1)) {
7070 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7072 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7074 resultobj = SWIG_Py_Void();
7081 SWIGINTERN PyObject *_wrap_LongVectorVector_data(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7082 PyObject *resultobj = 0;
7083 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7086 PyObject * obj0 = 0 ;
7087 std::vector< long > *result = 0 ;
7089 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVectorVector_data",&obj0)) SWIG_fail;
7090 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7091 if (!SWIG_IsOK(res1)) {
7092 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7094 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7095 result = (std::vector< long > *)(arg1)->data();
7096 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
7103 SWIGINTERN PyObject *_wrap_LongVectorVector_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7104 PyObject *resultobj = 0;
7105 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7108 PyObject * obj0 = 0 ;
7111 if (!PyArg_ParseTuple(args,(
char *)
"O:LongVectorVector_size",&obj0)) SWIG_fail;
7112 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7113 if (!SWIG_IsOK(res1)) {
7114 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7116 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7117 result = (size_t)(arg1)->size();
7118 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
7125 SWIGINTERN PyObject *_wrap_LongVectorVector_at(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7126 PyObject *resultobj = 0;
7127 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7133 PyObject * obj0 = 0 ;
7134 PyObject * obj1 = 0 ;
7135 std::vector< long > result;
7137 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVectorVector_at",&obj0,&obj1)) SWIG_fail;
7138 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7139 if (!SWIG_IsOK(res1)) {
7140 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< long > > const *""'");
7142 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7143 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7144 if (!SWIG_IsOK(ecode2)) {
7145 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LongVectorVector_at" "', argument " "2"" of type '" "size_t""'");
7147 arg2 =
static_cast< size_t >(val2);
7148 result = ((std::vector< std::vector< long > >
const *)arg1)->at(arg2);
7149 resultobj = SWIG_NewPointerObj((
new std::vector< long >(
static_cast< const std::vector< long >&
>(result))), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_OWN | 0 );
7156 SWIGINTERN PyObject *_wrap_LongVectorVector_resize(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7157 PyObject *resultobj = 0;
7158 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7164 PyObject * obj0 = 0 ;
7165 PyObject * obj1 = 0 ;
7167 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVectorVector_resize",&obj0,&obj1)) SWIG_fail;
7168 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7169 if (!SWIG_IsOK(res1)) {
7170 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7172 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7173 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7174 if (!SWIG_IsOK(ecode2)) {
7175 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LongVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
7177 arg2 =
static_cast< size_t >(val2);
7178 (arg1)->resize(arg2);
7179 resultobj = SWIG_Py_Void();
7186 SWIGINTERN PyObject *_wrap_LongVectorVector_swap(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7187 PyObject *resultobj = 0;
7188 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7189 std::vector< std::vector< long > > *arg2 = 0 ;
7194 PyObject * obj0 = 0 ;
7195 PyObject * obj1 = 0 ;
7197 if (!PyArg_ParseTuple(args,(
char *)
"OO:LongVectorVector_swap",&obj0,&obj1)) SWIG_fail;
7198 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7199 if (!SWIG_IsOK(res1)) {
7200 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LongVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7202 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7203 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 );
7204 if (!SWIG_IsOK(res2)) {
7205 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7208 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7210 arg2 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp2);
7211 (arg1)->swap(*arg2);
7212 resultobj = SWIG_Py_Void();
7219 SWIGINTERN PyObject *_wrap_delete_LongVectorVector(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7220 PyObject *resultobj = 0;
7221 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7224 PyObject * obj0 = 0 ;
7226 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_LongVectorVector",&obj0)) SWIG_fail;
7227 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_DISOWN | 0 );
7228 if (!SWIG_IsOK(res1)) {
7229 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_LongVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7231 arg1 =
reinterpret_cast< std::vector< std::vector< long >
> * >(argp1);
7233 resultobj = SWIG_Py_Void();
7240 SWIGINTERN PyObject *LongVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7242 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
7243 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_NewClientData(obj));
7244 return SWIG_Py_Void();
7247 SWIGINTERN
int Swig_var_hamming_batch_size_set(PyObject *_val) {
7250 int res = SWIG_AsVal_size_t(_val, &val);
7251 if (!SWIG_IsOK(res)) {
7252 SWIG_exception_fail(SWIG_ArgError(res),
"in variable '""faiss::hamming_batch_size""' of type '""size_t""'");
7254 faiss::hamming_batch_size =
static_cast< size_t >(val);
7262 SWIGINTERN PyObject *Swig_var_hamming_batch_size_get(
void) {
7263 PyObject *pyobj = 0;
7265 pyobj = SWIG_From_size_t(static_cast< size_t >(faiss::hamming_batch_size));
7270 SWIGINTERN PyObject *_wrap_popcount64(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7271 PyObject *resultobj = 0;
7273 unsigned long val1 ;
7275 PyObject * obj0 = 0 ;
7278 if (!PyArg_ParseTuple(args,(
char *)
"O:popcount64",&obj0)) SWIG_fail;
7279 ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
7280 if (!SWIG_IsOK(ecode1)) {
7281 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "popcount64" "', argument " "1"" of type '" "uint64_t""'");
7283 arg1 =
static_cast< uint64_t
>(val1);
7285 Py_BEGIN_ALLOW_THREADS
7287 result = (int)faiss::popcount64(arg1);
7289 PyEval_RestoreThread(_save);
7291 if (PyErr_Occurred()) {
7294 PyErr_SetString(PyExc_RuntimeError, e.
what());
7298 Py_END_ALLOW_THREADS
7300 resultobj = SWIG_From_int(static_cast< int >(result));
7307 SWIGINTERN PyObject *_wrap_hammings(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7308 PyObject *resultobj = 0;
7309 uint8_t *arg1 = (uint8_t *) 0 ;
7310 uint8_t *arg2 = (uint8_t *) 0 ;
7314 hamdis_t *arg6 = (hamdis_t *) 0 ;
7327 PyObject * obj0 = 0 ;
7328 PyObject * obj1 = 0 ;
7329 PyObject * obj2 = 0 ;
7330 PyObject * obj3 = 0 ;
7331 PyObject * obj4 = 0 ;
7332 PyObject * obj5 = 0 ;
7334 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:hammings",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7335 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7336 if (!SWIG_IsOK(res1)) {
7337 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hammings" "', argument " "1"" of type '" "uint8_t const *""'");
7339 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
7340 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7341 if (!SWIG_IsOK(res2)) {
7342 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "hammings" "', argument " "2"" of type '" "uint8_t const *""'");
7344 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7345 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7346 if (!SWIG_IsOK(ecode3)) {
7347 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "hammings" "', argument " "3"" of type '" "size_t""'");
7349 arg3 =
static_cast< size_t >(val3);
7350 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7351 if (!SWIG_IsOK(ecode4)) {
7352 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "hammings" "', argument " "4"" of type '" "size_t""'");
7354 arg4 =
static_cast< size_t >(val4);
7355 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7356 if (!SWIG_IsOK(ecode5)) {
7357 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "hammings" "', argument " "5"" of type '" "size_t""'");
7359 arg5 =
static_cast< size_t >(val5);
7360 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
7361 if (!SWIG_IsOK(res6)) {
7362 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "hammings" "', argument " "6"" of type '" "hamdis_t *""'");
7364 arg6 =
reinterpret_cast< hamdis_t *
>(argp6);
7366 Py_BEGIN_ALLOW_THREADS
7368 faiss::hammings((
unsigned char const *)arg1,(
unsigned char const *)arg2,arg3,arg4,arg5,arg6);
7370 PyEval_RestoreThread(_save);
7372 if (PyErr_Occurred()) {
7375 PyErr_SetString(PyExc_RuntimeError, e.
what());
7379 Py_END_ALLOW_THREADS
7381 resultobj = SWIG_Py_Void();
7388 SWIGINTERN PyObject *_wrap_bitvec_print(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7389 PyObject *resultobj = 0;
7390 uint8_t *arg1 = (uint8_t *) 0 ;
7396 PyObject * obj0 = 0 ;
7397 PyObject * obj1 = 0 ;
7399 if (!PyArg_ParseTuple(args,(
char *)
"OO:bitvec_print",&obj0,&obj1)) SWIG_fail;
7400 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7401 if (!SWIG_IsOK(res1)) {
7402 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "bitvec_print" "', argument " "1"" of type '" "uint8_t const *""'");
7404 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
7405 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7406 if (!SWIG_IsOK(ecode2)) {
7407 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "bitvec_print" "', argument " "2"" of type '" "size_t""'");
7409 arg2 =
static_cast< size_t >(val2);
7411 Py_BEGIN_ALLOW_THREADS
7413 faiss::bitvec_print((
unsigned char const *)arg1,arg2);
7415 PyEval_RestoreThread(_save);
7417 if (PyErr_Occurred()) {
7420 PyErr_SetString(PyExc_RuntimeError, e.
what());
7424 Py_END_ALLOW_THREADS
7426 resultobj = SWIG_Py_Void();
7433 SWIGINTERN PyObject *_wrap_fvecs2bitvecs(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7434 PyObject *resultobj = 0;
7435 float *arg1 = (
float *) 0 ;
7436 uint8_t *arg2 = (uint8_t *) 0 ;
7447 PyObject * obj0 = 0 ;
7448 PyObject * obj1 = 0 ;
7449 PyObject * obj2 = 0 ;
7450 PyObject * obj3 = 0 ;
7452 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:fvecs2bitvecs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7453 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7454 if (!SWIG_IsOK(res1)) {
7455 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvecs2bitvecs" "', argument " "1"" of type '" "float const *""'");
7457 arg1 =
reinterpret_cast< float *
>(argp1);
7458 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7459 if (!SWIG_IsOK(res2)) {
7460 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvecs2bitvecs" "', argument " "2"" of type '" "uint8_t *""'");
7462 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7463 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7464 if (!SWIG_IsOK(ecode3)) {
7465 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvecs2bitvecs" "', argument " "3"" of type '" "size_t""'");
7467 arg3 =
static_cast< size_t >(val3);
7468 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7469 if (!SWIG_IsOK(ecode4)) {
7470 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "fvecs2bitvecs" "', argument " "4"" of type '" "size_t""'");
7472 arg4 =
static_cast< size_t >(val4);
7474 Py_BEGIN_ALLOW_THREADS
7476 faiss::fvecs2bitvecs((
float const *)arg1,arg2,arg3,arg4);
7478 PyEval_RestoreThread(_save);
7480 if (PyErr_Occurred()) {
7483 PyErr_SetString(PyExc_RuntimeError, e.
what());
7487 Py_END_ALLOW_THREADS
7489 resultobj = SWIG_Py_Void();
7496 SWIGINTERN PyObject *_wrap_fvec2bitvec(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7497 PyObject *resultobj = 0;
7498 float *arg1 = (
float *) 0 ;
7499 uint8_t *arg2 = (uint8_t *) 0 ;
7507 PyObject * obj0 = 0 ;
7508 PyObject * obj1 = 0 ;
7509 PyObject * obj2 = 0 ;
7511 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec2bitvec",&obj0,&obj1,&obj2)) SWIG_fail;
7512 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7513 if (!SWIG_IsOK(res1)) {
7514 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec2bitvec" "', argument " "1"" of type '" "float const *""'");
7516 arg1 =
reinterpret_cast< float *
>(argp1);
7517 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7518 if (!SWIG_IsOK(res2)) {
7519 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec2bitvec" "', argument " "2"" of type '" "uint8_t *""'");
7521 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7522 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7523 if (!SWIG_IsOK(ecode3)) {
7524 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec2bitvec" "', argument " "3"" of type '" "size_t""'");
7526 arg3 =
static_cast< size_t >(val3);
7528 Py_BEGIN_ALLOW_THREADS
7530 faiss::fvec2bitvec((
float const *)arg1,arg2,arg3);
7532 PyEval_RestoreThread(_save);
7534 if (PyErr_Occurred()) {
7537 PyErr_SetString(PyExc_RuntimeError, e.
what());
7541 Py_END_ALLOW_THREADS
7543 resultobj = SWIG_Py_Void();
7550 SWIGINTERN PyObject *_wrap_hammings_knn_hc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7551 PyObject *resultobj = 0;
7553 uint8_t *arg2 = (uint8_t *) 0 ;
7554 uint8_t *arg3 = (uint8_t *) 0 ;
7570 PyObject * obj0 = 0 ;
7571 PyObject * obj1 = 0 ;
7572 PyObject * obj2 = 0 ;
7573 PyObject * obj3 = 0 ;
7574 PyObject * obj4 = 0 ;
7575 PyObject * obj5 = 0 ;
7577 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7578 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7579 if (!SWIG_IsOK(res1)) {
7580 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7583 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7584 if (!SWIG_IsOK(res2)) {
7585 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
7587 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7588 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7589 if (!SWIG_IsOK(res3)) {
7590 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
7592 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
7593 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7594 if (!SWIG_IsOK(ecode4)) {
7595 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
7597 arg4 =
static_cast< size_t >(val4);
7598 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7599 if (!SWIG_IsOK(ecode5)) {
7600 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
7602 arg5 =
static_cast< size_t >(val5);
7603 ecode6 = SWIG_AsVal_int(obj5, &val6);
7604 if (!SWIG_IsOK(ecode6)) {
7605 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "hammings_knn_hc" "', argument " "6"" of type '" "int""'");
7607 arg6 =
static_cast< int >(val6);
7609 Py_BEGIN_ALLOW_THREADS
7613 PyEval_RestoreThread(_save);
7615 if (PyErr_Occurred()) {
7618 PyErr_SetString(PyExc_RuntimeError, e.
what());
7622 Py_END_ALLOW_THREADS
7624 resultobj = SWIG_Py_Void();
7631 SWIGINTERN PyObject *_wrap_hammings_knn(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7632 PyObject *resultobj = 0;
7634 uint8_t *arg2 = (uint8_t *) 0 ;
7635 uint8_t *arg3 = (uint8_t *) 0 ;
7651 PyObject * obj0 = 0 ;
7652 PyObject * obj1 = 0 ;
7653 PyObject * obj2 = 0 ;
7654 PyObject * obj3 = 0 ;
7655 PyObject * obj4 = 0 ;
7656 PyObject * obj5 = 0 ;
7658 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:hammings_knn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7659 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7660 if (!SWIG_IsOK(res1)) {
7661 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hammings_knn" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7664 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7665 if (!SWIG_IsOK(res2)) {
7666 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "hammings_knn" "', argument " "2"" of type '" "uint8_t const *""'");
7668 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7669 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7670 if (!SWIG_IsOK(res3)) {
7671 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "hammings_knn" "', argument " "3"" of type '" "uint8_t const *""'");
7673 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
7674 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7675 if (!SWIG_IsOK(ecode4)) {
7676 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "hammings_knn" "', argument " "4"" of type '" "size_t""'");
7678 arg4 =
static_cast< size_t >(val4);
7679 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7680 if (!SWIG_IsOK(ecode5)) {
7681 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "hammings_knn" "', argument " "5"" of type '" "size_t""'");
7683 arg5 =
static_cast< size_t >(val5);
7684 ecode6 = SWIG_AsVal_int(obj5, &val6);
7685 if (!SWIG_IsOK(ecode6)) {
7686 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "hammings_knn" "', argument " "6"" of type '" "int""'");
7688 arg6 =
static_cast< int >(val6);
7690 Py_BEGIN_ALLOW_THREADS
7692 faiss::hammings_knn(arg1,(
unsigned char const *)arg2,(
unsigned char const *)arg3,arg4,arg5,arg6);
7694 PyEval_RestoreThread(_save);
7696 if (PyErr_Occurred()) {
7699 PyErr_SetString(PyExc_RuntimeError, e.
what());
7703 Py_END_ALLOW_THREADS
7705 resultobj = SWIG_Py_Void();
7712 SWIGINTERN PyObject *_wrap_hammings_knn_mc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7713 PyObject *resultobj = 0;
7714 uint8_t *arg1 = (uint8_t *) 0 ;
7715 uint8_t *arg2 = (uint8_t *) 0 ;
7720 int32_t *arg7 = (int32_t *) 0 ;
7721 long *arg8 = (
long *) 0 ;
7738 PyObject * obj0 = 0 ;
7739 PyObject * obj1 = 0 ;
7740 PyObject * obj2 = 0 ;
7741 PyObject * obj3 = 0 ;
7742 PyObject * obj4 = 0 ;
7743 PyObject * obj5 = 0 ;
7744 PyObject * obj6 = 0 ;
7745 PyObject * obj7 = 0 ;
7747 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOOO:hammings_knn_mc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7748 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7749 if (!SWIG_IsOK(res1)) {
7750 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hammings_knn_mc" "', argument " "1"" of type '" "uint8_t const *""'");
7752 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
7753 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7754 if (!SWIG_IsOK(res2)) {
7755 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "hammings_knn_mc" "', argument " "2"" of type '" "uint8_t const *""'");
7757 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7758 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7759 if (!SWIG_IsOK(ecode3)) {
7760 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "hammings_knn_mc" "', argument " "3"" of type '" "size_t""'");
7762 arg3 =
static_cast< size_t >(val3);
7763 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7764 if (!SWIG_IsOK(ecode4)) {
7765 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "hammings_knn_mc" "', argument " "4"" of type '" "size_t""'");
7767 arg4 =
static_cast< size_t >(val4);
7768 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7769 if (!SWIG_IsOK(ecode5)) {
7770 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "hammings_knn_mc" "', argument " "5"" of type '" "size_t""'");
7772 arg5 =
static_cast< size_t >(val5);
7773 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7774 if (!SWIG_IsOK(ecode6)) {
7775 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "hammings_knn_mc" "', argument " "6"" of type '" "size_t""'");
7777 arg6 =
static_cast< size_t >(val6);
7778 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
7779 if (!SWIG_IsOK(res7)) {
7780 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "hammings_knn_mc" "', argument " "7"" of type '" "int32_t *""'");
7782 arg7 =
reinterpret_cast< int32_t *
>(argp7);
7783 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
7784 if (!SWIG_IsOK(res8)) {
7785 SWIG_exception_fail(SWIG_ArgError(res8),
"in method '" "hammings_knn_mc" "', argument " "8"" of type '" "long *""'");
7787 arg8 =
reinterpret_cast< long *
>(argp8);
7789 Py_BEGIN_ALLOW_THREADS
7791 faiss::hammings_knn_mc((
unsigned char const *)arg1,(
unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7793 PyEval_RestoreThread(_save);
7795 if (PyErr_Occurred()) {
7798 PyErr_SetString(PyExc_RuntimeError, e.
what());
7802 Py_END_ALLOW_THREADS
7804 resultobj = SWIG_Py_Void();
7811 SWIGINTERN PyObject *_wrap_hamming_count_thres(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7812 PyObject *resultobj = 0;
7813 uint8_t *arg1 = (uint8_t *) 0 ;
7814 uint8_t *arg2 = (uint8_t *) 0 ;
7819 size_t *arg7 = (
size_t *) 0 ;
7834 PyObject * obj0 = 0 ;
7835 PyObject * obj1 = 0 ;
7836 PyObject * obj2 = 0 ;
7837 PyObject * obj3 = 0 ;
7838 PyObject * obj4 = 0 ;
7839 PyObject * obj5 = 0 ;
7840 PyObject * obj6 = 0 ;
7842 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:hamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
7843 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7844 if (!SWIG_IsOK(res1)) {
7845 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
7847 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
7848 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7849 if (!SWIG_IsOK(res2)) {
7850 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "hamming_count_thres" "', argument " "2"" of type '" "uint8_t const *""'");
7852 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7853 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7854 if (!SWIG_IsOK(ecode3)) {
7855 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "hamming_count_thres" "', argument " "3"" of type '" "size_t""'");
7857 arg3 =
static_cast< size_t >(val3);
7858 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7859 if (!SWIG_IsOK(ecode4)) {
7860 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "hamming_count_thres" "', argument " "4"" of type '" "size_t""'");
7862 arg4 =
static_cast< size_t >(val4);
7863 ecode5 = SWIG_AsVal_int(obj4, &val5);
7864 if (!SWIG_IsOK(ecode5)) {
7865 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "hamming_count_thres" "', argument " "5"" of type '" "hamdis_t""'");
7867 arg5 =
static_cast< hamdis_t
>(val5);
7868 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7869 if (!SWIG_IsOK(ecode6)) {
7870 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "hamming_count_thres" "', argument " "6"" of type '" "size_t""'");
7872 arg6 =
static_cast< size_t >(val6);
7873 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_long, 0 | 0 );
7874 if (!SWIG_IsOK(res7)) {
7875 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "hamming_count_thres" "', argument " "7"" of type '" "size_t *""'");
7877 arg7 =
reinterpret_cast< size_t *
>(argp7);
7879 Py_BEGIN_ALLOW_THREADS
7881 faiss::hamming_count_thres((
unsigned char const *)arg1,(
unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7);
7883 PyEval_RestoreThread(_save);
7885 if (PyErr_Occurred()) {
7888 PyErr_SetString(PyExc_RuntimeError, e.
what());
7892 Py_END_ALLOW_THREADS
7894 resultobj = SWIG_Py_Void();
7901 SWIGINTERN PyObject *_wrap_match_hamming_thres(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
7902 PyObject *resultobj = 0;
7903 uint8_t *arg1 = (uint8_t *) 0 ;
7904 uint8_t *arg2 = (uint8_t *) 0 ;
7909 long *arg7 = (
long *) 0 ;
7910 hamdis_t *arg8 = (hamdis_t *) 0 ;
7927 PyObject * obj0 = 0 ;
7928 PyObject * obj1 = 0 ;
7929 PyObject * obj2 = 0 ;
7930 PyObject * obj3 = 0 ;
7931 PyObject * obj4 = 0 ;
7932 PyObject * obj5 = 0 ;
7933 PyObject * obj6 = 0 ;
7934 PyObject * obj7 = 0 ;
7937 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOOO:match_hamming_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7938 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7939 if (!SWIG_IsOK(res1)) {
7940 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "match_hamming_thres" "', argument " "1"" of type '" "uint8_t const *""'");
7942 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
7943 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7944 if (!SWIG_IsOK(res2)) {
7945 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "match_hamming_thres" "', argument " "2"" of type '" "uint8_t const *""'");
7947 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
7948 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7949 if (!SWIG_IsOK(ecode3)) {
7950 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "match_hamming_thres" "', argument " "3"" of type '" "size_t""'");
7952 arg3 =
static_cast< size_t >(val3);
7953 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7954 if (!SWIG_IsOK(ecode4)) {
7955 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "match_hamming_thres" "', argument " "4"" of type '" "size_t""'");
7957 arg4 =
static_cast< size_t >(val4);
7958 ecode5 = SWIG_AsVal_int(obj4, &val5);
7959 if (!SWIG_IsOK(ecode5)) {
7960 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "match_hamming_thres" "', argument " "5"" of type '" "hamdis_t""'");
7962 arg5 =
static_cast< hamdis_t
>(val5);
7963 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7964 if (!SWIG_IsOK(ecode6)) {
7965 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "match_hamming_thres" "', argument " "6"" of type '" "size_t""'");
7967 arg6 =
static_cast< size_t >(val6);
7968 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_long, 0 | 0 );
7969 if (!SWIG_IsOK(res7)) {
7970 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "match_hamming_thres" "', argument " "7"" of type '" "long *""'");
7972 arg7 =
reinterpret_cast< long *
>(argp7);
7973 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 | 0 );
7974 if (!SWIG_IsOK(res8)) {
7975 SWIG_exception_fail(SWIG_ArgError(res8),
"in method '" "match_hamming_thres" "', argument " "8"" of type '" "hamdis_t *""'");
7977 arg8 =
reinterpret_cast< hamdis_t *
>(argp8);
7979 Py_BEGIN_ALLOW_THREADS
7981 result = (size_t)faiss::match_hamming_thres((
unsigned char const *)arg1,(
unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7983 PyEval_RestoreThread(_save);
7985 if (PyErr_Occurred()) {
7988 PyErr_SetString(PyExc_RuntimeError, e.
what());
7992 Py_END_ALLOW_THREADS
7994 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
8001 SWIGINTERN PyObject *_wrap_crosshamming_count_thres(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8002 PyObject *resultobj = 0;
8003 uint8_t *arg1 = (uint8_t *) 0 ;
8007 size_t *arg5 = (
size_t *) 0 ;
8018 PyObject * obj0 = 0 ;
8019 PyObject * obj1 = 0 ;
8020 PyObject * obj2 = 0 ;
8021 PyObject * obj3 = 0 ;
8022 PyObject * obj4 = 0 ;
8024 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:crosshamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8025 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8026 if (!SWIG_IsOK(res1)) {
8027 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "crosshamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
8029 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
8030 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
8031 if (!SWIG_IsOK(ecode2)) {
8032 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "crosshamming_count_thres" "', argument " "2"" of type '" "size_t""'");
8034 arg2 =
static_cast< size_t >(val2);
8035 ecode3 = SWIG_AsVal_int(obj2, &val3);
8036 if (!SWIG_IsOK(ecode3)) {
8037 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "crosshamming_count_thres" "', argument " "3"" of type '" "hamdis_t""'");
8039 arg3 =
static_cast< hamdis_t
>(val3);
8040 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
8041 if (!SWIG_IsOK(ecode4)) {
8042 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "crosshamming_count_thres" "', argument " "4"" of type '" "size_t""'");
8044 arg4 =
static_cast< size_t >(val4);
8045 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_long, 0 | 0 );
8046 if (!SWIG_IsOK(res5)) {
8047 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "crosshamming_count_thres" "', argument " "5"" of type '" "size_t *""'");
8049 arg5 =
reinterpret_cast< size_t *
>(argp5);
8051 Py_BEGIN_ALLOW_THREADS
8053 faiss::crosshamming_count_thres((
unsigned char const *)arg1,arg2,arg3,arg4,arg5);
8055 PyEval_RestoreThread(_save);
8057 if (PyErr_Occurred()) {
8060 PyErr_SetString(PyExc_RuntimeError, e.
what());
8064 Py_END_ALLOW_THREADS
8066 resultobj = SWIG_Py_Void();
8073 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8074 PyObject *resultobj = 0;
8081 PyObject * obj0 = 0 ;
8082 PyObject * obj1 = 0 ;
8084 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer4_a0_set",&obj0,&obj1)) SWIG_fail;
8085 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8086 if (!SWIG_IsOK(res1)) {
8087 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer4_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8091 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
8092 if (!SWIG_IsOK(res2)) {
8093 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8096 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8098 uint32_t * temp =
reinterpret_cast< uint32_t *
>(argp2);
8100 if (SWIG_IsNewObj(res2))
delete temp;
8103 if (arg1) (arg1)->a0 = arg2;
8104 resultobj = SWIG_Py_Void();
8111 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8112 PyObject *resultobj = 0;
8116 PyObject * obj0 = 0 ;
8119 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer4_a0_get",&obj0)) SWIG_fail;
8120 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8121 if (!SWIG_IsOK(res1)) {
8122 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer4_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8125 result = ((arg1)->a0);
8126 resultobj = SWIG_NewPointerObj((
new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
8133 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8134 PyObject *resultobj = 0;
8137 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer4")) SWIG_fail;
8139 Py_BEGIN_ALLOW_THREADS
8143 PyEval_RestoreThread(_save);
8145 if (PyErr_Occurred()) {
8148 PyErr_SetString(PyExc_RuntimeError, e.
what());
8152 Py_END_ALLOW_THREADS
8154 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8161 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8162 PyObject *resultobj = 0;
8163 uint8_t *arg1 = (uint8_t *) 0 ;
8169 PyObject * obj0 = 0 ;
8170 PyObject * obj1 = 0 ;
8173 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer4",&obj0,&obj1)) SWIG_fail;
8174 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8175 if (!SWIG_IsOK(res1)) {
8176 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer4" "', argument " "1"" of type '" "uint8_t const *""'");
8178 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
8179 ecode2 = SWIG_AsVal_int(obj1, &val2);
8180 if (!SWIG_IsOK(ecode2)) {
8181 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer4" "', argument " "2"" of type '" "int""'");
8183 arg2 =
static_cast< int >(val2);
8185 Py_BEGIN_ALLOW_THREADS
8189 PyEval_RestoreThread(_save);
8191 if (PyErr_Occurred()) {
8194 PyErr_SetString(PyExc_RuntimeError, e.
what());
8198 Py_END_ALLOW_THREADS
8200 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8207 SWIGINTERN PyObject *_wrap_new_HammingComputer4(PyObject *
self, PyObject *args) {
8209 PyObject *argv[3] = {
8214 if (!PyTuple_Check(args)) SWIG_fail;
8215 argc = args ? PyObject_Length(args) : 0;
8216 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8217 argv[ii] = PyTuple_GET_ITEM(args,ii);
8220 return _wrap_new_HammingComputer4__SWIG_0(
self, args);
8225 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8226 _v = SWIG_CheckState(res);
8229 int res = SWIG_AsVal_int(argv[1], NULL);
8230 _v = SWIG_CheckState(res);
8233 return _wrap_new_HammingComputer4__SWIG_1(
self, args);
8239 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer4'.\n"
8240 " Possible C/C++ prototypes are:\n"
8241 " faiss::HammingComputer4::HammingComputer4()\n"
8242 " faiss::HammingComputer4::HammingComputer4(uint8_t const *,int)\n");
8247 SWIGINTERN PyObject *_wrap_HammingComputer4_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8248 PyObject *resultobj = 0;
8250 uint8_t *arg2 = (uint8_t *) 0 ;
8258 PyObject * obj0 = 0 ;
8259 PyObject * obj1 = 0 ;
8260 PyObject * obj2 = 0 ;
8262 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer4_set",&obj0,&obj1,&obj2)) SWIG_fail;
8263 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8264 if (!SWIG_IsOK(res1)) {
8265 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer4_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8268 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8269 if (!SWIG_IsOK(res2)) {
8270 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer4_set" "', argument " "2"" of type '" "uint8_t const *""'");
8272 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8273 ecode3 = SWIG_AsVal_int(obj2, &val3);
8274 if (!SWIG_IsOK(ecode3)) {
8275 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer4_set" "', argument " "3"" of type '" "int""'");
8277 arg3 =
static_cast< int >(val3);
8279 Py_BEGIN_ALLOW_THREADS
8281 (arg1)->set((uint8_t
const *)arg2,arg3);
8283 PyEval_RestoreThread(_save);
8285 if (PyErr_Occurred()) {
8288 PyErr_SetString(PyExc_RuntimeError, e.
what());
8292 Py_END_ALLOW_THREADS
8294 resultobj = SWIG_Py_Void();
8301 SWIGINTERN PyObject *_wrap_HammingComputer4_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8302 PyObject *resultobj = 0;
8304 uint8_t *arg2 = (uint8_t *) 0 ;
8309 PyObject * obj0 = 0 ;
8310 PyObject * obj1 = 0 ;
8313 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer4_hamming",&obj0,&obj1)) SWIG_fail;
8314 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8315 if (!SWIG_IsOK(res1)) {
8316 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer4_hamming" "', argument " "1"" of type '" "faiss::HammingComputer4 const *""'");
8319 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8320 if (!SWIG_IsOK(res2)) {
8321 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8323 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8325 Py_BEGIN_ALLOW_THREADS
8329 PyEval_RestoreThread(_save);
8331 if (PyErr_Occurred()) {
8334 PyErr_SetString(PyExc_RuntimeError, e.
what());
8338 Py_END_ALLOW_THREADS
8340 resultobj = SWIG_From_int(static_cast< int >(result));
8347 SWIGINTERN PyObject *_wrap_delete_HammingComputer4(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8348 PyObject *resultobj = 0;
8352 PyObject * obj0 = 0 ;
8354 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer4",&obj0)) SWIG_fail;
8355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_DISOWN | 0 );
8356 if (!SWIG_IsOK(res1)) {
8357 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer4" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8361 resultobj = SWIG_Py_Void();
8368 SWIGINTERN PyObject *HammingComputer4_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8370 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
8371 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer4, SWIG_NewClientData(obj));
8372 return SWIG_Py_Void();
8375 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8376 PyObject *resultobj = 0;
8381 unsigned long val2 ;
8383 PyObject * obj0 = 0 ;
8384 PyObject * obj1 = 0 ;
8386 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
8387 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8388 if (!SWIG_IsOK(res1)) {
8389 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8392 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8393 if (!SWIG_IsOK(ecode2)) {
8394 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8396 arg2 =
static_cast< uint64_t
>(val2);
8397 if (arg1) (arg1)->a0 = arg2;
8398 resultobj = SWIG_Py_Void();
8405 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8406 PyObject *resultobj = 0;
8410 PyObject * obj0 = 0 ;
8413 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer8_a0_get",&obj0)) SWIG_fail;
8414 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8415 if (!SWIG_IsOK(res1)) {
8416 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8419 result = (uint64_t) ((arg1)->a0);
8420 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8427 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8428 PyObject *resultobj = 0;
8431 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer8")) SWIG_fail;
8433 Py_BEGIN_ALLOW_THREADS
8437 PyEval_RestoreThread(_save);
8439 if (PyErr_Occurred()) {
8442 PyErr_SetString(PyExc_RuntimeError, e.
what());
8446 Py_END_ALLOW_THREADS
8448 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8455 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8456 PyObject *resultobj = 0;
8457 uint8_t *arg1 = (uint8_t *) 0 ;
8463 PyObject * obj0 = 0 ;
8464 PyObject * obj1 = 0 ;
8467 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer8",&obj0,&obj1)) SWIG_fail;
8468 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8469 if (!SWIG_IsOK(res1)) {
8470 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
8472 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
8473 ecode2 = SWIG_AsVal_int(obj1, &val2);
8474 if (!SWIG_IsOK(ecode2)) {
8475 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer8" "', argument " "2"" of type '" "int""'");
8477 arg2 =
static_cast< int >(val2);
8479 Py_BEGIN_ALLOW_THREADS
8483 PyEval_RestoreThread(_save);
8485 if (PyErr_Occurred()) {
8488 PyErr_SetString(PyExc_RuntimeError, e.
what());
8492 Py_END_ALLOW_THREADS
8494 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8501 SWIGINTERN PyObject *_wrap_new_HammingComputer8(PyObject *
self, PyObject *args) {
8503 PyObject *argv[3] = {
8508 if (!PyTuple_Check(args)) SWIG_fail;
8509 argc = args ? PyObject_Length(args) : 0;
8510 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8511 argv[ii] = PyTuple_GET_ITEM(args,ii);
8514 return _wrap_new_HammingComputer8__SWIG_0(
self, args);
8519 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8520 _v = SWIG_CheckState(res);
8523 int res = SWIG_AsVal_int(argv[1], NULL);
8524 _v = SWIG_CheckState(res);
8527 return _wrap_new_HammingComputer8__SWIG_1(
self, args);
8533 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer8'.\n"
8534 " Possible C/C++ prototypes are:\n"
8535 " faiss::HammingComputer8::HammingComputer8()\n"
8536 " faiss::HammingComputer8::HammingComputer8(uint8_t const *,int)\n");
8541 SWIGINTERN PyObject *_wrap_HammingComputer8_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8542 PyObject *resultobj = 0;
8544 uint8_t *arg2 = (uint8_t *) 0 ;
8552 PyObject * obj0 = 0 ;
8553 PyObject * obj1 = 0 ;
8554 PyObject * obj2 = 0 ;
8556 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer8_set",&obj0,&obj1,&obj2)) SWIG_fail;
8557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8558 if (!SWIG_IsOK(res1)) {
8559 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer8_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8562 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8563 if (!SWIG_IsOK(res2)) {
8564 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer8_set" "', argument " "2"" of type '" "uint8_t const *""'");
8566 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8567 ecode3 = SWIG_AsVal_int(obj2, &val3);
8568 if (!SWIG_IsOK(ecode3)) {
8569 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer8_set" "', argument " "3"" of type '" "int""'");
8571 arg3 =
static_cast< int >(val3);
8573 Py_BEGIN_ALLOW_THREADS
8575 (arg1)->set((uint8_t
const *)arg2,arg3);
8577 PyEval_RestoreThread(_save);
8579 if (PyErr_Occurred()) {
8582 PyErr_SetString(PyExc_RuntimeError, e.
what());
8586 Py_END_ALLOW_THREADS
8588 resultobj = SWIG_Py_Void();
8595 SWIGINTERN PyObject *_wrap_HammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8596 PyObject *resultobj = 0;
8598 uint8_t *arg2 = (uint8_t *) 0 ;
8603 PyObject * obj0 = 0 ;
8604 PyObject * obj1 = 0 ;
8607 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
8608 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8609 if (!SWIG_IsOK(res1)) {
8610 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer8_hamming" "', argument " "1"" of type '" "faiss::HammingComputer8 const *""'");
8613 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8614 if (!SWIG_IsOK(res2)) {
8615 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8617 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8619 Py_BEGIN_ALLOW_THREADS
8623 PyEval_RestoreThread(_save);
8625 if (PyErr_Occurred()) {
8628 PyErr_SetString(PyExc_RuntimeError, e.
what());
8632 Py_END_ALLOW_THREADS
8634 resultobj = SWIG_From_int(static_cast< int >(result));
8641 SWIGINTERN PyObject *_wrap_delete_HammingComputer8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8642 PyObject *resultobj = 0;
8646 PyObject * obj0 = 0 ;
8648 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer8",&obj0)) SWIG_fail;
8649 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_DISOWN | 0 );
8650 if (!SWIG_IsOK(res1)) {
8651 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer8" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8655 resultobj = SWIG_Py_Void();
8662 SWIGINTERN PyObject *HammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8664 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
8665 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer8, SWIG_NewClientData(obj));
8666 return SWIG_Py_Void();
8669 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8670 PyObject *resultobj = 0;
8675 unsigned long val2 ;
8677 PyObject * obj0 = 0 ;
8678 PyObject * obj1 = 0 ;
8680 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
8681 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8682 if (!SWIG_IsOK(res1)) {
8683 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8686 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8687 if (!SWIG_IsOK(ecode2)) {
8688 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8690 arg2 =
static_cast< uint64_t
>(val2);
8691 if (arg1) (arg1)->a0 = arg2;
8692 resultobj = SWIG_Py_Void();
8699 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8700 PyObject *resultobj = 0;
8704 PyObject * obj0 = 0 ;
8707 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer16_a0_get",&obj0)) SWIG_fail;
8708 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8709 if (!SWIG_IsOK(res1)) {
8710 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8713 result = (uint64_t) ((arg1)->a0);
8714 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8721 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8722 PyObject *resultobj = 0;
8727 unsigned long val2 ;
8729 PyObject * obj0 = 0 ;
8730 PyObject * obj1 = 0 ;
8732 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
8733 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8734 if (!SWIG_IsOK(res1)) {
8735 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8738 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8739 if (!SWIG_IsOK(ecode2)) {
8740 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
8742 arg2 =
static_cast< uint64_t
>(val2);
8743 if (arg1) (arg1)->a1 = arg2;
8744 resultobj = SWIG_Py_Void();
8751 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8752 PyObject *resultobj = 0;
8756 PyObject * obj0 = 0 ;
8759 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer16_a1_get",&obj0)) SWIG_fail;
8760 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8761 if (!SWIG_IsOK(res1)) {
8762 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8765 result = (uint64_t) ((arg1)->a1);
8766 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8773 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8774 PyObject *resultobj = 0;
8777 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer16")) SWIG_fail;
8779 Py_BEGIN_ALLOW_THREADS
8783 PyEval_RestoreThread(_save);
8785 if (PyErr_Occurred()) {
8788 PyErr_SetString(PyExc_RuntimeError, e.
what());
8792 Py_END_ALLOW_THREADS
8794 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8801 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8802 PyObject *resultobj = 0;
8803 uint8_t *arg1 = (uint8_t *) 0 ;
8809 PyObject * obj0 = 0 ;
8810 PyObject * obj1 = 0 ;
8813 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer16",&obj0,&obj1)) SWIG_fail;
8814 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8815 if (!SWIG_IsOK(res1)) {
8816 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
8818 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
8819 ecode2 = SWIG_AsVal_int(obj1, &val2);
8820 if (!SWIG_IsOK(ecode2)) {
8821 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer16" "', argument " "2"" of type '" "int""'");
8823 arg2 =
static_cast< int >(val2);
8825 Py_BEGIN_ALLOW_THREADS
8829 PyEval_RestoreThread(_save);
8831 if (PyErr_Occurred()) {
8834 PyErr_SetString(PyExc_RuntimeError, e.
what());
8838 Py_END_ALLOW_THREADS
8840 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8847 SWIGINTERN PyObject *_wrap_new_HammingComputer16(PyObject *
self, PyObject *args) {
8849 PyObject *argv[3] = {
8854 if (!PyTuple_Check(args)) SWIG_fail;
8855 argc = args ? PyObject_Length(args) : 0;
8856 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8857 argv[ii] = PyTuple_GET_ITEM(args,ii);
8860 return _wrap_new_HammingComputer16__SWIG_0(
self, args);
8865 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8866 _v = SWIG_CheckState(res);
8869 int res = SWIG_AsVal_int(argv[1], NULL);
8870 _v = SWIG_CheckState(res);
8873 return _wrap_new_HammingComputer16__SWIG_1(
self, args);
8879 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer16'.\n"
8880 " Possible C/C++ prototypes are:\n"
8881 " faiss::HammingComputer16::HammingComputer16()\n"
8882 " faiss::HammingComputer16::HammingComputer16(uint8_t const *,int)\n");
8887 SWIGINTERN PyObject *_wrap_HammingComputer16_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8888 PyObject *resultobj = 0;
8890 uint8_t *arg2 = (uint8_t *) 0 ;
8898 PyObject * obj0 = 0 ;
8899 PyObject * obj1 = 0 ;
8900 PyObject * obj2 = 0 ;
8902 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer16_set",&obj0,&obj1,&obj2)) SWIG_fail;
8903 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8904 if (!SWIG_IsOK(res1)) {
8905 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8908 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8909 if (!SWIG_IsOK(res2)) {
8910 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer16_set" "', argument " "2"" of type '" "uint8_t const *""'");
8912 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8913 ecode3 = SWIG_AsVal_int(obj2, &val3);
8914 if (!SWIG_IsOK(ecode3)) {
8915 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer16_set" "', argument " "3"" of type '" "int""'");
8917 arg3 =
static_cast< int >(val3);
8919 Py_BEGIN_ALLOW_THREADS
8921 (arg1)->set((uint8_t
const *)arg2,arg3);
8923 PyEval_RestoreThread(_save);
8925 if (PyErr_Occurred()) {
8928 PyErr_SetString(PyExc_RuntimeError, e.
what());
8932 Py_END_ALLOW_THREADS
8934 resultobj = SWIG_Py_Void();
8941 SWIGINTERN PyObject *_wrap_HammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8942 PyObject *resultobj = 0;
8944 uint8_t *arg2 = (uint8_t *) 0 ;
8949 PyObject * obj0 = 0 ;
8950 PyObject * obj1 = 0 ;
8953 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
8954 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8955 if (!SWIG_IsOK(res1)) {
8956 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer16_hamming" "', argument " "1"" of type '" "faiss::HammingComputer16 const *""'");
8959 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8960 if (!SWIG_IsOK(res2)) {
8961 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8963 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
8965 Py_BEGIN_ALLOW_THREADS
8969 PyEval_RestoreThread(_save);
8971 if (PyErr_Occurred()) {
8974 PyErr_SetString(PyExc_RuntimeError, e.
what());
8978 Py_END_ALLOW_THREADS
8980 resultobj = SWIG_From_int(static_cast< int >(result));
8987 SWIGINTERN PyObject *_wrap_delete_HammingComputer16(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
8988 PyObject *resultobj = 0;
8992 PyObject * obj0 = 0 ;
8994 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer16",&obj0)) SWIG_fail;
8995 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_DISOWN | 0 );
8996 if (!SWIG_IsOK(res1)) {
8997 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer16" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
9001 resultobj = SWIG_Py_Void();
9008 SWIGINTERN PyObject *HammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9010 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
9011 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer16, SWIG_NewClientData(obj));
9012 return SWIG_Py_Void();
9015 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9016 PyObject *resultobj = 0;
9021 unsigned long val2 ;
9023 PyObject * obj0 = 0 ;
9024 PyObject * obj1 = 0 ;
9026 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer20_a0_set",&obj0,&obj1)) SWIG_fail;
9027 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9028 if (!SWIG_IsOK(res1)) {
9029 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9032 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9033 if (!SWIG_IsOK(ecode2)) {
9034 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer20_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9036 arg2 =
static_cast< uint64_t
>(val2);
9037 if (arg1) (arg1)->a0 = arg2;
9038 resultobj = SWIG_Py_Void();
9045 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9046 PyObject *resultobj = 0;
9050 PyObject * obj0 = 0 ;
9053 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer20_a0_get",&obj0)) SWIG_fail;
9054 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9055 if (!SWIG_IsOK(res1)) {
9056 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9059 result = (uint64_t) ((arg1)->a0);
9060 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9067 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9068 PyObject *resultobj = 0;
9073 unsigned long val2 ;
9075 PyObject * obj0 = 0 ;
9076 PyObject * obj1 = 0 ;
9078 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer20_a1_set",&obj0,&obj1)) SWIG_fail;
9079 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9080 if (!SWIG_IsOK(res1)) {
9081 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9084 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9085 if (!SWIG_IsOK(ecode2)) {
9086 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer20_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9088 arg2 =
static_cast< uint64_t
>(val2);
9089 if (arg1) (arg1)->a1 = arg2;
9090 resultobj = SWIG_Py_Void();
9097 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9098 PyObject *resultobj = 0;
9102 PyObject * obj0 = 0 ;
9105 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer20_a1_get",&obj0)) SWIG_fail;
9106 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9107 if (!SWIG_IsOK(res1)) {
9108 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9111 result = (uint64_t) ((arg1)->a1);
9112 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9119 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9120 PyObject *resultobj = 0;
9127 PyObject * obj0 = 0 ;
9128 PyObject * obj1 = 0 ;
9130 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer20_a2_set",&obj0,&obj1)) SWIG_fail;
9131 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9132 if (!SWIG_IsOK(res1)) {
9133 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9137 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
9138 if (!SWIG_IsOK(res2)) {
9139 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
9142 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
9144 uint32_t * temp =
reinterpret_cast< uint32_t *
>(argp2);
9146 if (SWIG_IsNewObj(res2))
delete temp;
9149 if (arg1) (arg1)->a2 = arg2;
9150 resultobj = SWIG_Py_Void();
9157 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9158 PyObject *resultobj = 0;
9162 PyObject * obj0 = 0 ;
9165 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer20_a2_get",&obj0)) SWIG_fail;
9166 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9167 if (!SWIG_IsOK(res1)) {
9168 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9171 result = ((arg1)->a2);
9172 resultobj = SWIG_NewPointerObj((
new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
9179 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9180 PyObject *resultobj = 0;
9183 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer20")) SWIG_fail;
9185 Py_BEGIN_ALLOW_THREADS
9189 PyEval_RestoreThread(_save);
9191 if (PyErr_Occurred()) {
9194 PyErr_SetString(PyExc_RuntimeError, e.
what());
9198 Py_END_ALLOW_THREADS
9200 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9207 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9208 PyObject *resultobj = 0;
9209 uint8_t *arg1 = (uint8_t *) 0 ;
9215 PyObject * obj0 = 0 ;
9216 PyObject * obj1 = 0 ;
9219 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer20",&obj0,&obj1)) SWIG_fail;
9220 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9221 if (!SWIG_IsOK(res1)) {
9222 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer20" "', argument " "1"" of type '" "uint8_t const *""'");
9224 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
9225 ecode2 = SWIG_AsVal_int(obj1, &val2);
9226 if (!SWIG_IsOK(ecode2)) {
9227 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer20" "', argument " "2"" of type '" "int""'");
9229 arg2 =
static_cast< int >(val2);
9231 Py_BEGIN_ALLOW_THREADS
9235 PyEval_RestoreThread(_save);
9237 if (PyErr_Occurred()) {
9240 PyErr_SetString(PyExc_RuntimeError, e.
what());
9244 Py_END_ALLOW_THREADS
9246 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9253 SWIGINTERN PyObject *_wrap_new_HammingComputer20(PyObject *
self, PyObject *args) {
9255 PyObject *argv[3] = {
9260 if (!PyTuple_Check(args)) SWIG_fail;
9261 argc = args ? PyObject_Length(args) : 0;
9262 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9263 argv[ii] = PyTuple_GET_ITEM(args,ii);
9266 return _wrap_new_HammingComputer20__SWIG_0(
self, args);
9271 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9272 _v = SWIG_CheckState(res);
9275 int res = SWIG_AsVal_int(argv[1], NULL);
9276 _v = SWIG_CheckState(res);
9279 return _wrap_new_HammingComputer20__SWIG_1(
self, args);
9285 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer20'.\n"
9286 " Possible C/C++ prototypes are:\n"
9287 " faiss::HammingComputer20::HammingComputer20()\n"
9288 " faiss::HammingComputer20::HammingComputer20(uint8_t const *,int)\n");
9293 SWIGINTERN PyObject *_wrap_HammingComputer20_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9294 PyObject *resultobj = 0;
9296 uint8_t *arg2 = (uint8_t *) 0 ;
9304 PyObject * obj0 = 0 ;
9305 PyObject * obj1 = 0 ;
9306 PyObject * obj2 = 0 ;
9308 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer20_set",&obj0,&obj1,&obj2)) SWIG_fail;
9309 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9310 if (!SWIG_IsOK(res1)) {
9311 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9314 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9315 if (!SWIG_IsOK(res2)) {
9316 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer20_set" "', argument " "2"" of type '" "uint8_t const *""'");
9318 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
9319 ecode3 = SWIG_AsVal_int(obj2, &val3);
9320 if (!SWIG_IsOK(ecode3)) {
9321 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer20_set" "', argument " "3"" of type '" "int""'");
9323 arg3 =
static_cast< int >(val3);
9325 Py_BEGIN_ALLOW_THREADS
9327 (arg1)->set((uint8_t
const *)arg2,arg3);
9329 PyEval_RestoreThread(_save);
9331 if (PyErr_Occurred()) {
9334 PyErr_SetString(PyExc_RuntimeError, e.
what());
9338 Py_END_ALLOW_THREADS
9340 resultobj = SWIG_Py_Void();
9347 SWIGINTERN PyObject *_wrap_HammingComputer20_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9348 PyObject *resultobj = 0;
9350 uint8_t *arg2 = (uint8_t *) 0 ;
9355 PyObject * obj0 = 0 ;
9356 PyObject * obj1 = 0 ;
9359 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer20_hamming",&obj0,&obj1)) SWIG_fail;
9360 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9361 if (!SWIG_IsOK(res1)) {
9362 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer20_hamming" "', argument " "1"" of type '" "faiss::HammingComputer20 const *""'");
9365 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9366 if (!SWIG_IsOK(res2)) {
9367 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer20_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9369 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
9371 Py_BEGIN_ALLOW_THREADS
9375 PyEval_RestoreThread(_save);
9377 if (PyErr_Occurred()) {
9380 PyErr_SetString(PyExc_RuntimeError, e.
what());
9384 Py_END_ALLOW_THREADS
9386 resultobj = SWIG_From_int(static_cast< int >(result));
9393 SWIGINTERN PyObject *_wrap_delete_HammingComputer20(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9394 PyObject *resultobj = 0;
9398 PyObject * obj0 = 0 ;
9400 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer20",&obj0)) SWIG_fail;
9401 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_DISOWN | 0 );
9402 if (!SWIG_IsOK(res1)) {
9403 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer20" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9407 resultobj = SWIG_Py_Void();
9414 SWIGINTERN PyObject *HammingComputer20_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9416 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
9417 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer20, SWIG_NewClientData(obj));
9418 return SWIG_Py_Void();
9421 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9422 PyObject *resultobj = 0;
9427 unsigned long val2 ;
9429 PyObject * obj0 = 0 ;
9430 PyObject * obj1 = 0 ;
9432 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
9433 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9434 if (!SWIG_IsOK(res1)) {
9435 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9438 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9439 if (!SWIG_IsOK(ecode2)) {
9440 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9442 arg2 =
static_cast< uint64_t
>(val2);
9443 if (arg1) (arg1)->a0 = arg2;
9444 resultobj = SWIG_Py_Void();
9451 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9452 PyObject *resultobj = 0;
9456 PyObject * obj0 = 0 ;
9459 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer32_a0_get",&obj0)) SWIG_fail;
9460 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9461 if (!SWIG_IsOK(res1)) {
9462 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9465 result = (uint64_t) ((arg1)->a0);
9466 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9473 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9474 PyObject *resultobj = 0;
9479 unsigned long val2 ;
9481 PyObject * obj0 = 0 ;
9482 PyObject * obj1 = 0 ;
9484 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
9485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9486 if (!SWIG_IsOK(res1)) {
9487 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9490 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9491 if (!SWIG_IsOK(ecode2)) {
9492 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9494 arg2 =
static_cast< uint64_t
>(val2);
9495 if (arg1) (arg1)->a1 = arg2;
9496 resultobj = SWIG_Py_Void();
9503 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9504 PyObject *resultobj = 0;
9508 PyObject * obj0 = 0 ;
9511 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer32_a1_get",&obj0)) SWIG_fail;
9512 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9513 if (!SWIG_IsOK(res1)) {
9514 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9517 result = (uint64_t) ((arg1)->a1);
9518 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9525 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9526 PyObject *resultobj = 0;
9531 unsigned long val2 ;
9533 PyObject * obj0 = 0 ;
9534 PyObject * obj1 = 0 ;
9536 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
9537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9538 if (!SWIG_IsOK(res1)) {
9539 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9542 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9543 if (!SWIG_IsOK(ecode2)) {
9544 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
9546 arg2 =
static_cast< uint64_t
>(val2);
9547 if (arg1) (arg1)->a2 = arg2;
9548 resultobj = SWIG_Py_Void();
9555 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9556 PyObject *resultobj = 0;
9560 PyObject * obj0 = 0 ;
9563 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer32_a2_get",&obj0)) SWIG_fail;
9564 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9565 if (!SWIG_IsOK(res1)) {
9566 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9569 result = (uint64_t) ((arg1)->a2);
9570 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9577 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9578 PyObject *resultobj = 0;
9583 unsigned long val2 ;
9585 PyObject * obj0 = 0 ;
9586 PyObject * obj1 = 0 ;
9588 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
9589 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9590 if (!SWIG_IsOK(res1)) {
9591 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9594 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9595 if (!SWIG_IsOK(ecode2)) {
9596 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
9598 arg2 =
static_cast< uint64_t
>(val2);
9599 if (arg1) (arg1)->a3 = arg2;
9600 resultobj = SWIG_Py_Void();
9607 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9608 PyObject *resultobj = 0;
9612 PyObject * obj0 = 0 ;
9615 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer32_a3_get",&obj0)) SWIG_fail;
9616 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9617 if (!SWIG_IsOK(res1)) {
9618 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9621 result = (uint64_t) ((arg1)->a3);
9622 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9629 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9630 PyObject *resultobj = 0;
9633 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer32")) SWIG_fail;
9635 Py_BEGIN_ALLOW_THREADS
9639 PyEval_RestoreThread(_save);
9641 if (PyErr_Occurred()) {
9644 PyErr_SetString(PyExc_RuntimeError, e.
what());
9648 Py_END_ALLOW_THREADS
9650 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9657 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9658 PyObject *resultobj = 0;
9659 uint8_t *arg1 = (uint8_t *) 0 ;
9665 PyObject * obj0 = 0 ;
9666 PyObject * obj1 = 0 ;
9669 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer32",&obj0,&obj1)) SWIG_fail;
9670 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9671 if (!SWIG_IsOK(res1)) {
9672 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
9674 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
9675 ecode2 = SWIG_AsVal_int(obj1, &val2);
9676 if (!SWIG_IsOK(ecode2)) {
9677 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer32" "', argument " "2"" of type '" "int""'");
9679 arg2 =
static_cast< int >(val2);
9681 Py_BEGIN_ALLOW_THREADS
9685 PyEval_RestoreThread(_save);
9687 if (PyErr_Occurred()) {
9690 PyErr_SetString(PyExc_RuntimeError, e.
what());
9694 Py_END_ALLOW_THREADS
9696 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9703 SWIGINTERN PyObject *_wrap_new_HammingComputer32(PyObject *
self, PyObject *args) {
9705 PyObject *argv[3] = {
9710 if (!PyTuple_Check(args)) SWIG_fail;
9711 argc = args ? PyObject_Length(args) : 0;
9712 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9713 argv[ii] = PyTuple_GET_ITEM(args,ii);
9716 return _wrap_new_HammingComputer32__SWIG_0(
self, args);
9721 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9722 _v = SWIG_CheckState(res);
9725 int res = SWIG_AsVal_int(argv[1], NULL);
9726 _v = SWIG_CheckState(res);
9729 return _wrap_new_HammingComputer32__SWIG_1(
self, args);
9735 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer32'.\n"
9736 " Possible C/C++ prototypes are:\n"
9737 " faiss::HammingComputer32::HammingComputer32()\n"
9738 " faiss::HammingComputer32::HammingComputer32(uint8_t const *,int)\n");
9743 SWIGINTERN PyObject *_wrap_HammingComputer32_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9744 PyObject *resultobj = 0;
9746 uint8_t *arg2 = (uint8_t *) 0 ;
9754 PyObject * obj0 = 0 ;
9755 PyObject * obj1 = 0 ;
9756 PyObject * obj2 = 0 ;
9758 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer32_set",&obj0,&obj1,&obj2)) SWIG_fail;
9759 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9760 if (!SWIG_IsOK(res1)) {
9761 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9764 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9765 if (!SWIG_IsOK(res2)) {
9766 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer32_set" "', argument " "2"" of type '" "uint8_t const *""'");
9768 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
9769 ecode3 = SWIG_AsVal_int(obj2, &val3);
9770 if (!SWIG_IsOK(ecode3)) {
9771 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer32_set" "', argument " "3"" of type '" "int""'");
9773 arg3 =
static_cast< int >(val3);
9775 Py_BEGIN_ALLOW_THREADS
9777 (arg1)->set((uint8_t
const *)arg2,arg3);
9779 PyEval_RestoreThread(_save);
9781 if (PyErr_Occurred()) {
9784 PyErr_SetString(PyExc_RuntimeError, e.
what());
9788 Py_END_ALLOW_THREADS
9790 resultobj = SWIG_Py_Void();
9797 SWIGINTERN PyObject *_wrap_HammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9798 PyObject *resultobj = 0;
9800 uint8_t *arg2 = (uint8_t *) 0 ;
9805 PyObject * obj0 = 0 ;
9806 PyObject * obj1 = 0 ;
9809 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
9810 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9811 if (!SWIG_IsOK(res1)) {
9812 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer32_hamming" "', argument " "1"" of type '" "faiss::HammingComputer32 const *""'");
9815 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9816 if (!SWIG_IsOK(res2)) {
9817 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9819 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
9821 Py_BEGIN_ALLOW_THREADS
9825 PyEval_RestoreThread(_save);
9827 if (PyErr_Occurred()) {
9830 PyErr_SetString(PyExc_RuntimeError, e.
what());
9834 Py_END_ALLOW_THREADS
9836 resultobj = SWIG_From_int(static_cast< int >(result));
9843 SWIGINTERN PyObject *_wrap_delete_HammingComputer32(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9844 PyObject *resultobj = 0;
9848 PyObject * obj0 = 0 ;
9850 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer32",&obj0)) SWIG_fail;
9851 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_DISOWN | 0 );
9852 if (!SWIG_IsOK(res1)) {
9853 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer32" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9857 resultobj = SWIG_Py_Void();
9864 SWIGINTERN PyObject *HammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9866 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
9867 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer32, SWIG_NewClientData(obj));
9868 return SWIG_Py_Void();
9871 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9872 PyObject *resultobj = 0;
9877 unsigned long val2 ;
9879 PyObject * obj0 = 0 ;
9880 PyObject * obj1 = 0 ;
9882 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a0_set",&obj0,&obj1)) SWIG_fail;
9883 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9884 if (!SWIG_IsOK(res1)) {
9885 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9888 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9889 if (!SWIG_IsOK(ecode2)) {
9890 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9892 arg2 =
static_cast< uint64_t
>(val2);
9893 if (arg1) (arg1)->a0 = arg2;
9894 resultobj = SWIG_Py_Void();
9901 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9902 PyObject *resultobj = 0;
9906 PyObject * obj0 = 0 ;
9909 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a0_get",&obj0)) SWIG_fail;
9910 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9911 if (!SWIG_IsOK(res1)) {
9912 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9915 result = (uint64_t) ((arg1)->a0);
9916 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9923 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9924 PyObject *resultobj = 0;
9929 unsigned long val2 ;
9931 PyObject * obj0 = 0 ;
9932 PyObject * obj1 = 0 ;
9934 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a1_set",&obj0,&obj1)) SWIG_fail;
9935 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9936 if (!SWIG_IsOK(res1)) {
9937 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9940 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9941 if (!SWIG_IsOK(ecode2)) {
9942 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9944 arg2 =
static_cast< uint64_t
>(val2);
9945 if (arg1) (arg1)->a1 = arg2;
9946 resultobj = SWIG_Py_Void();
9953 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9954 PyObject *resultobj = 0;
9958 PyObject * obj0 = 0 ;
9961 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a1_get",&obj0)) SWIG_fail;
9962 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9963 if (!SWIG_IsOK(res1)) {
9964 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9967 result = (uint64_t) ((arg1)->a1);
9968 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9975 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
9976 PyObject *resultobj = 0;
9981 unsigned long val2 ;
9983 PyObject * obj0 = 0 ;
9984 PyObject * obj1 = 0 ;
9986 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a2_set",&obj0,&obj1)) SWIG_fail;
9987 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9988 if (!SWIG_IsOK(res1)) {
9989 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9992 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9993 if (!SWIG_IsOK(ecode2)) {
9994 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a2_set" "', argument " "2"" of type '" "uint64_t""'");
9996 arg2 =
static_cast< uint64_t
>(val2);
9997 if (arg1) (arg1)->a2 = arg2;
9998 resultobj = SWIG_Py_Void();
10005 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10006 PyObject *resultobj = 0;
10010 PyObject * obj0 = 0 ;
10013 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a2_get",&obj0)) SWIG_fail;
10014 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10015 if (!SWIG_IsOK(res1)) {
10016 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10019 result = (uint64_t) ((arg1)->a2);
10020 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10027 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10028 PyObject *resultobj = 0;
10033 unsigned long val2 ;
10035 PyObject * obj0 = 0 ;
10036 PyObject * obj1 = 0 ;
10038 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a3_set",&obj0,&obj1)) SWIG_fail;
10039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10040 if (!SWIG_IsOK(res1)) {
10041 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10044 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10045 if (!SWIG_IsOK(ecode2)) {
10046 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a3_set" "', argument " "2"" of type '" "uint64_t""'");
10048 arg2 =
static_cast< uint64_t
>(val2);
10049 if (arg1) (arg1)->a3 = arg2;
10050 resultobj = SWIG_Py_Void();
10057 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10058 PyObject *resultobj = 0;
10062 PyObject * obj0 = 0 ;
10065 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a3_get",&obj0)) SWIG_fail;
10066 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10067 if (!SWIG_IsOK(res1)) {
10068 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10071 result = (uint64_t) ((arg1)->a3);
10072 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10079 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10080 PyObject *resultobj = 0;
10085 unsigned long val2 ;
10087 PyObject * obj0 = 0 ;
10088 PyObject * obj1 = 0 ;
10090 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a4_set",&obj0,&obj1)) SWIG_fail;
10091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10092 if (!SWIG_IsOK(res1)) {
10093 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a4_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10096 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10097 if (!SWIG_IsOK(ecode2)) {
10098 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a4_set" "', argument " "2"" of type '" "uint64_t""'");
10100 arg2 =
static_cast< uint64_t
>(val2);
10101 if (arg1) (arg1)->a4 = arg2;
10102 resultobj = SWIG_Py_Void();
10109 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10110 PyObject *resultobj = 0;
10114 PyObject * obj0 = 0 ;
10117 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a4_get",&obj0)) SWIG_fail;
10118 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10119 if (!SWIG_IsOK(res1)) {
10120 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a4_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10123 result = (uint64_t) ((arg1)->a4);
10124 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10131 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10132 PyObject *resultobj = 0;
10137 unsigned long val2 ;
10139 PyObject * obj0 = 0 ;
10140 PyObject * obj1 = 0 ;
10142 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a5_set",&obj0,&obj1)) SWIG_fail;
10143 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10144 if (!SWIG_IsOK(res1)) {
10145 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a5_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10148 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10149 if (!SWIG_IsOK(ecode2)) {
10150 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a5_set" "', argument " "2"" of type '" "uint64_t""'");
10152 arg2 =
static_cast< uint64_t
>(val2);
10153 if (arg1) (arg1)->a5 = arg2;
10154 resultobj = SWIG_Py_Void();
10161 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10162 PyObject *resultobj = 0;
10166 PyObject * obj0 = 0 ;
10169 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a5_get",&obj0)) SWIG_fail;
10170 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10171 if (!SWIG_IsOK(res1)) {
10172 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a5_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10175 result = (uint64_t) ((arg1)->a5);
10176 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10183 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10184 PyObject *resultobj = 0;
10189 unsigned long val2 ;
10191 PyObject * obj0 = 0 ;
10192 PyObject * obj1 = 0 ;
10194 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a6_set",&obj0,&obj1)) SWIG_fail;
10195 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10196 if (!SWIG_IsOK(res1)) {
10197 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a6_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10200 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10201 if (!SWIG_IsOK(ecode2)) {
10202 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a6_set" "', argument " "2"" of type '" "uint64_t""'");
10204 arg2 =
static_cast< uint64_t
>(val2);
10205 if (arg1) (arg1)->a6 = arg2;
10206 resultobj = SWIG_Py_Void();
10213 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10214 PyObject *resultobj = 0;
10218 PyObject * obj0 = 0 ;
10221 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a6_get",&obj0)) SWIG_fail;
10222 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10223 if (!SWIG_IsOK(res1)) {
10224 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a6_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10227 result = (uint64_t) ((arg1)->a6);
10228 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10235 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10236 PyObject *resultobj = 0;
10241 unsigned long val2 ;
10243 PyObject * obj0 = 0 ;
10244 PyObject * obj1 = 0 ;
10246 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_a7_set",&obj0,&obj1)) SWIG_fail;
10247 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10248 if (!SWIG_IsOK(res1)) {
10249 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a7_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10252 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10253 if (!SWIG_IsOK(ecode2)) {
10254 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputer64_a7_set" "', argument " "2"" of type '" "uint64_t""'");
10256 arg2 =
static_cast< uint64_t
>(val2);
10257 if (arg1) (arg1)->a7 = arg2;
10258 resultobj = SWIG_Py_Void();
10265 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10266 PyObject *resultobj = 0;
10270 PyObject * obj0 = 0 ;
10273 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputer64_a7_get",&obj0)) SWIG_fail;
10274 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10275 if (!SWIG_IsOK(res1)) {
10276 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_a7_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10279 result = (uint64_t) ((arg1)->a7);
10280 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10287 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10288 PyObject *resultobj = 0;
10291 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputer64")) SWIG_fail;
10293 Py_BEGIN_ALLOW_THREADS
10297 PyEval_RestoreThread(_save);
10299 if (PyErr_Occurred()) {
10302 PyErr_SetString(PyExc_RuntimeError, e.
what());
10306 Py_END_ALLOW_THREADS
10308 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10315 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10316 PyObject *resultobj = 0;
10317 uint8_t *arg1 = (uint8_t *) 0 ;
10323 PyObject * obj0 = 0 ;
10324 PyObject * obj1 = 0 ;
10327 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputer64",&obj0,&obj1)) SWIG_fail;
10328 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10329 if (!SWIG_IsOK(res1)) {
10330 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputer64" "', argument " "1"" of type '" "uint8_t const *""'");
10332 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
10333 ecode2 = SWIG_AsVal_int(obj1, &val2);
10334 if (!SWIG_IsOK(ecode2)) {
10335 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputer64" "', argument " "2"" of type '" "int""'");
10337 arg2 =
static_cast< int >(val2);
10339 Py_BEGIN_ALLOW_THREADS
10343 PyEval_RestoreThread(_save);
10345 if (PyErr_Occurred()) {
10348 PyErr_SetString(PyExc_RuntimeError, e.
what());
10352 Py_END_ALLOW_THREADS
10354 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10361 SWIGINTERN PyObject *_wrap_new_HammingComputer64(PyObject *
self, PyObject *args) {
10363 PyObject *argv[3] = {
10368 if (!PyTuple_Check(args)) SWIG_fail;
10369 argc = args ? PyObject_Length(args) : 0;
10370 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10371 argv[ii] = PyTuple_GET_ITEM(args,ii);
10374 return _wrap_new_HammingComputer64__SWIG_0(
self, args);
10379 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10380 _v = SWIG_CheckState(res);
10383 int res = SWIG_AsVal_int(argv[1], NULL);
10384 _v = SWIG_CheckState(res);
10387 return _wrap_new_HammingComputer64__SWIG_1(
self, args);
10393 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputer64'.\n"
10394 " Possible C/C++ prototypes are:\n"
10395 " faiss::HammingComputer64::HammingComputer64()\n"
10396 " faiss::HammingComputer64::HammingComputer64(uint8_t const *,int)\n");
10401 SWIGINTERN PyObject *_wrap_HammingComputer64_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10402 PyObject *resultobj = 0;
10404 uint8_t *arg2 = (uint8_t *) 0 ;
10412 PyObject * obj0 = 0 ;
10413 PyObject * obj1 = 0 ;
10414 PyObject * obj2 = 0 ;
10416 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputer64_set",&obj0,&obj1,&obj2)) SWIG_fail;
10417 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10418 if (!SWIG_IsOK(res1)) {
10419 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10422 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10423 if (!SWIG_IsOK(res2)) {
10424 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer64_set" "', argument " "2"" of type '" "uint8_t const *""'");
10426 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
10427 ecode3 = SWIG_AsVal_int(obj2, &val3);
10428 if (!SWIG_IsOK(ecode3)) {
10429 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputer64_set" "', argument " "3"" of type '" "int""'");
10431 arg3 =
static_cast< int >(val3);
10433 Py_BEGIN_ALLOW_THREADS
10435 (arg1)->set((uint8_t
const *)arg2,arg3);
10437 PyEval_RestoreThread(_save);
10439 if (PyErr_Occurred()) {
10442 PyErr_SetString(PyExc_RuntimeError, e.
what());
10446 Py_END_ALLOW_THREADS
10448 resultobj = SWIG_Py_Void();
10455 SWIGINTERN PyObject *_wrap_HammingComputer64_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10456 PyObject *resultobj = 0;
10458 uint8_t *arg2 = (uint8_t *) 0 ;
10463 PyObject * obj0 = 0 ;
10464 PyObject * obj1 = 0 ;
10467 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputer64_hamming",&obj0,&obj1)) SWIG_fail;
10468 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10469 if (!SWIG_IsOK(res1)) {
10470 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputer64_hamming" "', argument " "1"" of type '" "faiss::HammingComputer64 const *""'");
10473 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10474 if (!SWIG_IsOK(res2)) {
10475 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputer64_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10477 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
10479 Py_BEGIN_ALLOW_THREADS
10483 PyEval_RestoreThread(_save);
10485 if (PyErr_Occurred()) {
10488 PyErr_SetString(PyExc_RuntimeError, e.
what());
10492 Py_END_ALLOW_THREADS
10494 resultobj = SWIG_From_int(static_cast< int >(result));
10501 SWIGINTERN PyObject *_wrap_delete_HammingComputer64(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10502 PyObject *resultobj = 0;
10506 PyObject * obj0 = 0 ;
10508 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputer64",&obj0)) SWIG_fail;
10509 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_DISOWN | 0 );
10510 if (!SWIG_IsOK(res1)) {
10511 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputer64" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10515 resultobj = SWIG_Py_Void();
10522 SWIGINTERN PyObject *HammingComputer64_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10524 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
10525 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer64, SWIG_NewClientData(obj));
10526 return SWIG_Py_Void();
10529 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10530 PyObject *resultobj = 0;
10532 uint8_t *arg2 = (uint8_t *) 0 ;
10537 PyObject * obj0 = 0 ;
10538 PyObject * obj1 = 0 ;
10540 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerDefault_a_set",&obj0,&obj1)) SWIG_fail;
10541 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10542 if (!SWIG_IsOK(res1)) {
10543 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_a_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10546 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
10547 if (!SWIG_IsOK(res2)) {
10548 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerDefault_a_set" "', argument " "2"" of type '" "uint8_t const *""'");
10550 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
10551 if (arg1) (arg1)->a = (uint8_t
const *)arg2;
10552 resultobj = SWIG_Py_Void();
10559 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10560 PyObject *resultobj = 0;
10564 PyObject * obj0 = 0 ;
10565 uint8_t *result = 0 ;
10567 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerDefault_a_get",&obj0)) SWIG_fail;
10568 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10569 if (!SWIG_IsOK(res1)) {
10570 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_a_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10573 result = (uint8_t *) ((arg1)->a);
10574 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
10581 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10582 PyObject *resultobj = 0;
10589 PyObject * obj0 = 0 ;
10590 PyObject * obj1 = 0 ;
10592 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerDefault_n_set",&obj0,&obj1)) SWIG_fail;
10593 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10594 if (!SWIG_IsOK(res1)) {
10595 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_n_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10598 ecode2 = SWIG_AsVal_int(obj1, &val2);
10599 if (!SWIG_IsOK(ecode2)) {
10600 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputerDefault_n_set" "', argument " "2"" of type '" "int""'");
10602 arg2 =
static_cast< int >(val2);
10603 if (arg1) (arg1)->n = arg2;
10604 resultobj = SWIG_Py_Void();
10611 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10612 PyObject *resultobj = 0;
10616 PyObject * obj0 = 0 ;
10619 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerDefault_n_get",&obj0)) SWIG_fail;
10620 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10621 if (!SWIG_IsOK(res1)) {
10622 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_n_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10625 result = (int) ((arg1)->n);
10626 resultobj = SWIG_From_int(static_cast< int >(result));
10633 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10634 PyObject *resultobj = 0;
10637 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputerDefault")) SWIG_fail;
10639 Py_BEGIN_ALLOW_THREADS
10643 PyEval_RestoreThread(_save);
10645 if (PyErr_Occurred()) {
10648 PyErr_SetString(PyExc_RuntimeError, e.
what());
10652 Py_END_ALLOW_THREADS
10654 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10661 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10662 PyObject *resultobj = 0;
10663 uint8_t *arg1 = (uint8_t *) 0 ;
10669 PyObject * obj0 = 0 ;
10670 PyObject * obj1 = 0 ;
10673 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputerDefault",&obj0,&obj1)) SWIG_fail;
10674 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10675 if (!SWIG_IsOK(res1)) {
10676 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputerDefault" "', argument " "1"" of type '" "uint8_t const *""'");
10678 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
10679 ecode2 = SWIG_AsVal_int(obj1, &val2);
10680 if (!SWIG_IsOK(ecode2)) {
10681 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputerDefault" "', argument " "2"" of type '" "int""'");
10683 arg2 =
static_cast< int >(val2);
10685 Py_BEGIN_ALLOW_THREADS
10689 PyEval_RestoreThread(_save);
10691 if (PyErr_Occurred()) {
10694 PyErr_SetString(PyExc_RuntimeError, e.
what());
10698 Py_END_ALLOW_THREADS
10700 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10707 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault(PyObject *
self, PyObject *args) {
10709 PyObject *argv[3] = {
10714 if (!PyTuple_Check(args)) SWIG_fail;
10715 argc = args ? PyObject_Length(args) : 0;
10716 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10717 argv[ii] = PyTuple_GET_ITEM(args,ii);
10720 return _wrap_new_HammingComputerDefault__SWIG_0(
self, args);
10725 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10726 _v = SWIG_CheckState(res);
10729 int res = SWIG_AsVal_int(argv[1], NULL);
10730 _v = SWIG_CheckState(res);
10733 return _wrap_new_HammingComputerDefault__SWIG_1(
self, args);
10739 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputerDefault'.\n"
10740 " Possible C/C++ prototypes are:\n"
10741 " faiss::HammingComputerDefault::HammingComputerDefault()\n"
10742 " faiss::HammingComputerDefault::HammingComputerDefault(uint8_t const *,int)\n");
10747 SWIGINTERN PyObject *_wrap_HammingComputerDefault_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10748 PyObject *resultobj = 0;
10750 uint8_t *arg2 = (uint8_t *) 0 ;
10758 PyObject * obj0 = 0 ;
10759 PyObject * obj1 = 0 ;
10760 PyObject * obj2 = 0 ;
10762 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputerDefault_set",&obj0,&obj1,&obj2)) SWIG_fail;
10763 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10764 if (!SWIG_IsOK(res1)) {
10765 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10768 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10769 if (!SWIG_IsOK(res2)) {
10770 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerDefault_set" "', argument " "2"" of type '" "uint8_t const *""'");
10772 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
10773 ecode3 = SWIG_AsVal_int(obj2, &val3);
10774 if (!SWIG_IsOK(ecode3)) {
10775 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputerDefault_set" "', argument " "3"" of type '" "int""'");
10777 arg3 =
static_cast< int >(val3);
10779 Py_BEGIN_ALLOW_THREADS
10781 (arg1)->set((uint8_t
const *)arg2,arg3);
10783 PyEval_RestoreThread(_save);
10785 if (PyErr_Occurred()) {
10788 PyErr_SetString(PyExc_RuntimeError, e.
what());
10792 Py_END_ALLOW_THREADS
10794 resultobj = SWIG_Py_Void();
10801 SWIGINTERN PyObject *_wrap_HammingComputerDefault_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10802 PyObject *resultobj = 0;
10804 uint8_t *arg2 = (uint8_t *) 0 ;
10809 PyObject * obj0 = 0 ;
10810 PyObject * obj1 = 0 ;
10813 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerDefault_hamming",&obj0,&obj1)) SWIG_fail;
10814 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10815 if (!SWIG_IsOK(res1)) {
10816 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerDefault_hamming" "', argument " "1"" of type '" "faiss::HammingComputerDefault const *""'");
10819 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10820 if (!SWIG_IsOK(res2)) {
10821 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerDefault_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10823 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
10825 Py_BEGIN_ALLOW_THREADS
10829 PyEval_RestoreThread(_save);
10831 if (PyErr_Occurred()) {
10834 PyErr_SetString(PyExc_RuntimeError, e.
what());
10838 Py_END_ALLOW_THREADS
10840 resultobj = SWIG_From_int(static_cast< int >(result));
10847 SWIGINTERN PyObject *_wrap_delete_HammingComputerDefault(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10848 PyObject *resultobj = 0;
10852 PyObject * obj0 = 0 ;
10854 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputerDefault",&obj0)) SWIG_fail;
10855 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_DISOWN | 0 );
10856 if (!SWIG_IsOK(res1)) {
10857 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputerDefault" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10861 resultobj = SWIG_Py_Void();
10868 SWIGINTERN PyObject *HammingComputerDefault_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10870 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
10871 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_NewClientData(obj));
10872 return SWIG_Py_Void();
10875 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10876 PyObject *resultobj = 0;
10878 uint64_t *arg2 = (uint64_t *) 0 ;
10883 PyObject * obj0 = 0 ;
10884 PyObject * obj1 = 0 ;
10886 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
10887 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10888 if (!SWIG_IsOK(res1)) {
10889 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10892 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
10893 if (!SWIG_IsOK(res2)) {
10894 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
10896 arg2 =
reinterpret_cast< uint64_t *
>(argp2);
10897 if (arg1) (arg1)->a = (uint64_t
const *)arg2;
10898 resultobj = SWIG_Py_Void();
10905 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10906 PyObject *resultobj = 0;
10910 PyObject * obj0 = 0 ;
10911 uint64_t *result = 0 ;
10913 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerM8_a_get",&obj0)) SWIG_fail;
10914 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10915 if (!SWIG_IsOK(res1)) {
10916 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10919 result = (uint64_t *) ((arg1)->a);
10920 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
10927 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10928 PyObject *resultobj = 0;
10935 PyObject * obj0 = 0 ;
10936 PyObject * obj1 = 0 ;
10938 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
10939 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10940 if (!SWIG_IsOK(res1)) {
10941 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10944 ecode2 = SWIG_AsVal_int(obj1, &val2);
10945 if (!SWIG_IsOK(ecode2)) {
10946 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
10948 arg2 =
static_cast< int >(val2);
10949 if (arg1) (arg1)->n = arg2;
10950 resultobj = SWIG_Py_Void();
10957 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10958 PyObject *resultobj = 0;
10962 PyObject * obj0 = 0 ;
10965 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerM8_n_get",&obj0)) SWIG_fail;
10966 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10967 if (!SWIG_IsOK(res1)) {
10968 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10971 result = (int) ((arg1)->n);
10972 resultobj = SWIG_From_int(static_cast< int >(result));
10979 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
10980 PyObject *resultobj = 0;
10983 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputerM8")) SWIG_fail;
10985 Py_BEGIN_ALLOW_THREADS
10989 PyEval_RestoreThread(_save);
10991 if (PyErr_Occurred()) {
10994 PyErr_SetString(PyExc_RuntimeError, e.
what());
10998 Py_END_ALLOW_THREADS
11000 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
11007 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11008 PyObject *resultobj = 0;
11009 uint8_t *arg1 = (uint8_t *) 0 ;
11015 PyObject * obj0 = 0 ;
11016 PyObject * obj1 = 0 ;
11019 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputerM8",&obj0,&obj1)) SWIG_fail;
11020 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11021 if (!SWIG_IsOK(res1)) {
11022 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
11024 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
11025 ecode2 = SWIG_AsVal_int(obj1, &val2);
11026 if (!SWIG_IsOK(ecode2)) {
11027 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputerM8" "', argument " "2"" of type '" "int""'");
11029 arg2 =
static_cast< int >(val2);
11031 Py_BEGIN_ALLOW_THREADS
11035 PyEval_RestoreThread(_save);
11037 if (PyErr_Occurred()) {
11040 PyErr_SetString(PyExc_RuntimeError, e.
what());
11044 Py_END_ALLOW_THREADS
11046 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
11053 SWIGINTERN PyObject *_wrap_new_HammingComputerM8(PyObject *
self, PyObject *args) {
11055 PyObject *argv[3] = {
11060 if (!PyTuple_Check(args)) SWIG_fail;
11061 argc = args ? PyObject_Length(args) : 0;
11062 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
11063 argv[ii] = PyTuple_GET_ITEM(args,ii);
11066 return _wrap_new_HammingComputerM8__SWIG_0(
self, args);
11071 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
11072 _v = SWIG_CheckState(res);
11075 int res = SWIG_AsVal_int(argv[1], NULL);
11076 _v = SWIG_CheckState(res);
11079 return _wrap_new_HammingComputerM8__SWIG_1(
self, args);
11085 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputerM8'.\n"
11086 " Possible C/C++ prototypes are:\n"
11087 " faiss::HammingComputerM8::HammingComputerM8()\n"
11088 " faiss::HammingComputerM8::HammingComputerM8(uint8_t const *,int)\n");
11093 SWIGINTERN PyObject *_wrap_HammingComputerM8_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11094 PyObject *resultobj = 0;
11096 uint8_t *arg2 = (uint8_t *) 0 ;
11104 PyObject * obj0 = 0 ;
11105 PyObject * obj1 = 0 ;
11106 PyObject * obj2 = 0 ;
11108 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputerM8_set",&obj0,&obj1,&obj2)) SWIG_fail;
11109 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
11110 if (!SWIG_IsOK(res1)) {
11111 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
11114 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11115 if (!SWIG_IsOK(res2)) {
11116 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM8_set" "', argument " "2"" of type '" "uint8_t const *""'");
11118 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11119 ecode3 = SWIG_AsVal_int(obj2, &val3);
11120 if (!SWIG_IsOK(ecode3)) {
11121 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputerM8_set" "', argument " "3"" of type '" "int""'");
11123 arg3 =
static_cast< int >(val3);
11125 Py_BEGIN_ALLOW_THREADS
11127 (arg1)->set((uint8_t
const *)arg2,arg3);
11129 PyEval_RestoreThread(_save);
11131 if (PyErr_Occurred()) {
11134 PyErr_SetString(PyExc_RuntimeError, e.
what());
11138 Py_END_ALLOW_THREADS
11140 resultobj = SWIG_Py_Void();
11147 SWIGINTERN PyObject *_wrap_HammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11148 PyObject *resultobj = 0;
11150 uint8_t *arg2 = (uint8_t *) 0 ;
11155 PyObject * obj0 = 0 ;
11156 PyObject * obj1 = 0 ;
11159 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
11160 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
11161 if (!SWIG_IsOK(res1)) {
11162 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM8 const *""'");
11165 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11166 if (!SWIG_IsOK(res2)) {
11167 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11169 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11171 Py_BEGIN_ALLOW_THREADS
11175 PyEval_RestoreThread(_save);
11177 if (PyErr_Occurred()) {
11180 PyErr_SetString(PyExc_RuntimeError, e.
what());
11184 Py_END_ALLOW_THREADS
11186 resultobj = SWIG_From_int(static_cast< int >(result));
11193 SWIGINTERN PyObject *_wrap_delete_HammingComputerM8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11194 PyObject *resultobj = 0;
11198 PyObject * obj0 = 0 ;
11200 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputerM8",&obj0)) SWIG_fail;
11201 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_DISOWN | 0 );
11202 if (!SWIG_IsOK(res1)) {
11203 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputerM8" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
11207 resultobj = SWIG_Py_Void();
11214 SWIGINTERN PyObject *HammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11216 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
11217 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM8, SWIG_NewClientData(obj));
11218 return SWIG_Py_Void();
11221 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11222 PyObject *resultobj = 0;
11224 uint32_t *arg2 = (uint32_t *) 0 ;
11229 PyObject * obj0 = 0 ;
11230 PyObject * obj1 = 0 ;
11232 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM4_a_set",&obj0,&obj1)) SWIG_fail;
11233 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11234 if (!SWIG_IsOK(res1)) {
11235 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11238 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint32_t, SWIG_POINTER_DISOWN | 0 );
11239 if (!SWIG_IsOK(res2)) {
11240 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM4_a_set" "', argument " "2"" of type '" "uint32_t const *""'");
11242 arg2 =
reinterpret_cast< uint32_t *
>(argp2);
11243 if (arg1) (arg1)->a = (uint32_t
const *)arg2;
11244 resultobj = SWIG_Py_Void();
11251 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11252 PyObject *resultobj = 0;
11256 PyObject * obj0 = 0 ;
11257 uint32_t *result = 0 ;
11259 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerM4_a_get",&obj0)) SWIG_fail;
11260 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11261 if (!SWIG_IsOK(res1)) {
11262 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11265 result = (uint32_t *) ((arg1)->a);
11266 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint32_t, 0 | 0 );
11273 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11274 PyObject *resultobj = 0;
11281 PyObject * obj0 = 0 ;
11282 PyObject * obj1 = 0 ;
11284 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM4_n_set",&obj0,&obj1)) SWIG_fail;
11285 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11286 if (!SWIG_IsOK(res1)) {
11287 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11290 ecode2 = SWIG_AsVal_int(obj1, &val2);
11291 if (!SWIG_IsOK(ecode2)) {
11292 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "HammingComputerM4_n_set" "', argument " "2"" of type '" "int""'");
11294 arg2 =
static_cast< int >(val2);
11295 if (arg1) (arg1)->n = arg2;
11296 resultobj = SWIG_Py_Void();
11303 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11304 PyObject *resultobj = 0;
11308 PyObject * obj0 = 0 ;
11311 if (!PyArg_ParseTuple(args,(
char *)
"O:HammingComputerM4_n_get",&obj0)) SWIG_fail;
11312 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11313 if (!SWIG_IsOK(res1)) {
11314 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11317 result = (int) ((arg1)->n);
11318 resultobj = SWIG_From_int(static_cast< int >(result));
11325 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11326 PyObject *resultobj = 0;
11329 if (!PyArg_ParseTuple(args,(
char *)
":new_HammingComputerM4")) SWIG_fail;
11331 Py_BEGIN_ALLOW_THREADS
11335 PyEval_RestoreThread(_save);
11337 if (PyErr_Occurred()) {
11340 PyErr_SetString(PyExc_RuntimeError, e.
what());
11344 Py_END_ALLOW_THREADS
11346 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11353 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11354 PyObject *resultobj = 0;
11355 uint8_t *arg1 = (uint8_t *) 0 ;
11361 PyObject * obj0 = 0 ;
11362 PyObject * obj1 = 0 ;
11365 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_HammingComputerM4",&obj0,&obj1)) SWIG_fail;
11366 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11367 if (!SWIG_IsOK(res1)) {
11368 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_HammingComputerM4" "', argument " "1"" of type '" "uint8_t const *""'");
11370 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
11371 ecode2 = SWIG_AsVal_int(obj1, &val2);
11372 if (!SWIG_IsOK(ecode2)) {
11373 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_HammingComputerM4" "', argument " "2"" of type '" "int""'");
11375 arg2 =
static_cast< int >(val2);
11377 Py_BEGIN_ALLOW_THREADS
11381 PyEval_RestoreThread(_save);
11383 if (PyErr_Occurred()) {
11386 PyErr_SetString(PyExc_RuntimeError, e.
what());
11390 Py_END_ALLOW_THREADS
11392 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11399 SWIGINTERN PyObject *_wrap_new_HammingComputerM4(PyObject *
self, PyObject *args) {
11401 PyObject *argv[3] = {
11406 if (!PyTuple_Check(args)) SWIG_fail;
11407 argc = args ? PyObject_Length(args) : 0;
11408 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
11409 argv[ii] = PyTuple_GET_ITEM(args,ii);
11412 return _wrap_new_HammingComputerM4__SWIG_0(
self, args);
11417 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
11418 _v = SWIG_CheckState(res);
11421 int res = SWIG_AsVal_int(argv[1], NULL);
11422 _v = SWIG_CheckState(res);
11425 return _wrap_new_HammingComputerM4__SWIG_1(
self, args);
11431 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_HammingComputerM4'.\n"
11432 " Possible C/C++ prototypes are:\n"
11433 " faiss::HammingComputerM4::HammingComputerM4()\n"
11434 " faiss::HammingComputerM4::HammingComputerM4(uint8_t const *,int)\n");
11439 SWIGINTERN PyObject *_wrap_HammingComputerM4_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11440 PyObject *resultobj = 0;
11442 uint8_t *arg2 = (uint8_t *) 0 ;
11450 PyObject * obj0 = 0 ;
11451 PyObject * obj1 = 0 ;
11452 PyObject * obj2 = 0 ;
11454 if (!PyArg_ParseTuple(args,(
char *)
"OOO:HammingComputerM4_set",&obj0,&obj1,&obj2)) SWIG_fail;
11455 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11456 if (!SWIG_IsOK(res1)) {
11457 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11460 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11461 if (!SWIG_IsOK(res2)) {
11462 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM4_set" "', argument " "2"" of type '" "uint8_t const *""'");
11464 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11465 ecode3 = SWIG_AsVal_int(obj2, &val3);
11466 if (!SWIG_IsOK(ecode3)) {
11467 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "HammingComputerM4_set" "', argument " "3"" of type '" "int""'");
11469 arg3 =
static_cast< int >(val3);
11471 Py_BEGIN_ALLOW_THREADS
11473 (arg1)->set((uint8_t
const *)arg2,arg3);
11475 PyEval_RestoreThread(_save);
11477 if (PyErr_Occurred()) {
11480 PyErr_SetString(PyExc_RuntimeError, e.
what());
11484 Py_END_ALLOW_THREADS
11486 resultobj = SWIG_Py_Void();
11493 SWIGINTERN PyObject *_wrap_HammingComputerM4_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11494 PyObject *resultobj = 0;
11496 uint8_t *arg2 = (uint8_t *) 0 ;
11501 PyObject * obj0 = 0 ;
11502 PyObject * obj1 = 0 ;
11505 if (!PyArg_ParseTuple(args,(
char *)
"OO:HammingComputerM4_hamming",&obj0,&obj1)) SWIG_fail;
11506 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11507 if (!SWIG_IsOK(res1)) {
11508 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "HammingComputerM4_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM4 const *""'");
11511 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11512 if (!SWIG_IsOK(res2)) {
11513 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "HammingComputerM4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11515 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11517 Py_BEGIN_ALLOW_THREADS
11521 PyEval_RestoreThread(_save);
11523 if (PyErr_Occurred()) {
11526 PyErr_SetString(PyExc_RuntimeError, e.
what());
11530 Py_END_ALLOW_THREADS
11532 resultobj = SWIG_From_int(static_cast< int >(result));
11539 SWIGINTERN PyObject *_wrap_delete_HammingComputerM4(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11540 PyObject *resultobj = 0;
11544 PyObject * obj0 = 0 ;
11546 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_HammingComputerM4",&obj0)) SWIG_fail;
11547 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_DISOWN | 0 );
11548 if (!SWIG_IsOK(res1)) {
11549 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_HammingComputerM4" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11553 resultobj = SWIG_Py_Void();
11560 SWIGINTERN PyObject *HammingComputerM4_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11562 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
11563 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM4, SWIG_NewClientData(obj));
11564 return SWIG_Py_Void();
11567 SWIGINTERN PyObject *_wrap_generalized_hamming_64(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11568 PyObject *resultobj = 0;
11570 unsigned long val1 ;
11572 PyObject * obj0 = 0 ;
11575 if (!PyArg_ParseTuple(args,(
char *)
"O:generalized_hamming_64",&obj0)) SWIG_fail;
11576 ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
11577 if (!SWIG_IsOK(ecode1)) {
11578 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "generalized_hamming_64" "', argument " "1"" of type '" "uint64_t""'");
11580 arg1 =
static_cast< uint64_t
>(val1);
11582 Py_BEGIN_ALLOW_THREADS
11584 result = (int)faiss::generalized_hamming_64(arg1);
11586 PyEval_RestoreThread(_save);
11588 if (PyErr_Occurred()) {
11591 PyErr_SetString(PyExc_RuntimeError, e.
what());
11595 Py_END_ALLOW_THREADS
11597 resultobj = SWIG_From_int(static_cast< int >(result));
11604 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11605 PyObject *resultobj = 0;
11610 unsigned long val2 ;
11612 PyObject * obj0 = 0 ;
11613 PyObject * obj1 = 0 ;
11615 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
11616 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11617 if (!SWIG_IsOK(res1)) {
11618 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11621 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11622 if (!SWIG_IsOK(ecode2)) {
11623 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11625 arg2 =
static_cast< uint64_t
>(val2);
11626 if (arg1) (arg1)->a0 = arg2;
11627 resultobj = SWIG_Py_Void();
11634 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11635 PyObject *resultobj = 0;
11639 PyObject * obj0 = 0 ;
11642 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer8_a0_get",&obj0)) SWIG_fail;
11643 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11644 if (!SWIG_IsOK(res1)) {
11645 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11648 result = (uint64_t) ((arg1)->a0);
11649 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11656 SWIGINTERN PyObject *_wrap_new_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11657 PyObject *resultobj = 0;
11658 uint8_t *arg1 = (uint8_t *) 0 ;
11664 PyObject * obj0 = 0 ;
11665 PyObject * obj1 = 0 ;
11668 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_GenHammingComputer8",&obj0,&obj1)) SWIG_fail;
11669 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11670 if (!SWIG_IsOK(res1)) {
11671 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_GenHammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
11673 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
11674 ecode2 = SWIG_AsVal_int(obj1, &val2);
11675 if (!SWIG_IsOK(ecode2)) {
11676 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_GenHammingComputer8" "', argument " "2"" of type '" "int""'");
11678 arg2 =
static_cast< int >(val2);
11680 Py_BEGIN_ALLOW_THREADS
11684 PyEval_RestoreThread(_save);
11686 if (PyErr_Occurred()) {
11689 PyErr_SetString(PyExc_RuntimeError, e.
what());
11693 Py_END_ALLOW_THREADS
11695 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_NEW | 0 );
11702 SWIGINTERN PyObject *_wrap_GenHammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11703 PyObject *resultobj = 0;
11705 uint8_t *arg2 = (uint8_t *) 0 ;
11710 PyObject * obj0 = 0 ;
11711 PyObject * obj1 = 0 ;
11714 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
11715 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11716 if (!SWIG_IsOK(res1)) {
11717 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer8 const *""'");
11720 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11721 if (!SWIG_IsOK(res2)) {
11722 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "GenHammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11724 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11726 Py_BEGIN_ALLOW_THREADS
11730 PyEval_RestoreThread(_save);
11732 if (PyErr_Occurred()) {
11735 PyErr_SetString(PyExc_RuntimeError, e.
what());
11739 Py_END_ALLOW_THREADS
11741 resultobj = SWIG_From_int(static_cast< int >(result));
11748 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11749 PyObject *resultobj = 0;
11753 PyObject * obj0 = 0 ;
11755 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_GenHammingComputer8",&obj0)) SWIG_fail;
11756 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_DISOWN | 0 );
11757 if (!SWIG_IsOK(res1)) {
11758 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_GenHammingComputer8" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11762 resultobj = SWIG_Py_Void();
11769 SWIGINTERN PyObject *GenHammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11771 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
11772 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_NewClientData(obj));
11773 return SWIG_Py_Void();
11776 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11777 PyObject *resultobj = 0;
11782 unsigned long val2 ;
11784 PyObject * obj0 = 0 ;
11785 PyObject * obj1 = 0 ;
11787 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
11788 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11789 if (!SWIG_IsOK(res1)) {
11790 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11793 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11794 if (!SWIG_IsOK(ecode2)) {
11795 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11797 arg2 =
static_cast< uint64_t
>(val2);
11798 if (arg1) (arg1)->a0 = arg2;
11799 resultobj = SWIG_Py_Void();
11806 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11807 PyObject *resultobj = 0;
11811 PyObject * obj0 = 0 ;
11814 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer16_a0_get",&obj0)) SWIG_fail;
11815 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11816 if (!SWIG_IsOK(res1)) {
11817 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11820 result = (uint64_t) ((arg1)->a0);
11821 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11828 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11829 PyObject *resultobj = 0;
11834 unsigned long val2 ;
11836 PyObject * obj0 = 0 ;
11837 PyObject * obj1 = 0 ;
11839 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
11840 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11841 if (!SWIG_IsOK(res1)) {
11842 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11845 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11846 if (!SWIG_IsOK(ecode2)) {
11847 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
11849 arg2 =
static_cast< uint64_t
>(val2);
11850 if (arg1) (arg1)->a1 = arg2;
11851 resultobj = SWIG_Py_Void();
11858 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11859 PyObject *resultobj = 0;
11863 PyObject * obj0 = 0 ;
11866 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer16_a1_get",&obj0)) SWIG_fail;
11867 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11868 if (!SWIG_IsOK(res1)) {
11869 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11872 result = (uint64_t) ((arg1)->a1);
11873 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11880 SWIGINTERN PyObject *_wrap_new_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11881 PyObject *resultobj = 0;
11882 uint8_t *arg1 = (uint8_t *) 0 ;
11888 PyObject * obj0 = 0 ;
11889 PyObject * obj1 = 0 ;
11892 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_GenHammingComputer16",&obj0,&obj1)) SWIG_fail;
11893 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11894 if (!SWIG_IsOK(res1)) {
11895 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_GenHammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
11897 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
11898 ecode2 = SWIG_AsVal_int(obj1, &val2);
11899 if (!SWIG_IsOK(ecode2)) {
11900 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_GenHammingComputer16" "', argument " "2"" of type '" "int""'");
11902 arg2 =
static_cast< int >(val2);
11904 Py_BEGIN_ALLOW_THREADS
11908 PyEval_RestoreThread(_save);
11910 if (PyErr_Occurred()) {
11913 PyErr_SetString(PyExc_RuntimeError, e.
what());
11917 Py_END_ALLOW_THREADS
11919 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_NEW | 0 );
11926 SWIGINTERN PyObject *_wrap_GenHammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11927 PyObject *resultobj = 0;
11929 uint8_t *arg2 = (uint8_t *) 0 ;
11934 PyObject * obj0 = 0 ;
11935 PyObject * obj1 = 0 ;
11938 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
11939 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11940 if (!SWIG_IsOK(res1)) {
11941 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer16_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer16 const *""'");
11944 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11945 if (!SWIG_IsOK(res2)) {
11946 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "GenHammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11948 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
11950 Py_BEGIN_ALLOW_THREADS
11954 PyEval_RestoreThread(_save);
11956 if (PyErr_Occurred()) {
11959 PyErr_SetString(PyExc_RuntimeError, e.
what());
11963 Py_END_ALLOW_THREADS
11965 resultobj = SWIG_From_int(static_cast< int >(result));
11972 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11973 PyObject *resultobj = 0;
11977 PyObject * obj0 = 0 ;
11979 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_GenHammingComputer16",&obj0)) SWIG_fail;
11980 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_DISOWN | 0 );
11981 if (!SWIG_IsOK(res1)) {
11982 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_GenHammingComputer16" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11986 resultobj = SWIG_Py_Void();
11993 SWIGINTERN PyObject *GenHammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
11995 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
11996 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_NewClientData(obj));
11997 return SWIG_Py_Void();
12000 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12001 PyObject *resultobj = 0;
12006 unsigned long val2 ;
12008 PyObject * obj0 = 0 ;
12009 PyObject * obj1 = 0 ;
12011 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
12012 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12013 if (!SWIG_IsOK(res1)) {
12014 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12017 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12018 if (!SWIG_IsOK(ecode2)) {
12019 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
12021 arg2 =
static_cast< uint64_t
>(val2);
12022 if (arg1) (arg1)->a0 = arg2;
12023 resultobj = SWIG_Py_Void();
12030 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12031 PyObject *resultobj = 0;
12035 PyObject * obj0 = 0 ;
12038 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer32_a0_get",&obj0)) SWIG_fail;
12039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12040 if (!SWIG_IsOK(res1)) {
12041 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12044 result = (uint64_t) ((arg1)->a0);
12045 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12052 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12053 PyObject *resultobj = 0;
12058 unsigned long val2 ;
12060 PyObject * obj0 = 0 ;
12061 PyObject * obj1 = 0 ;
12063 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
12064 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12065 if (!SWIG_IsOK(res1)) {
12066 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12069 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12070 if (!SWIG_IsOK(ecode2)) {
12071 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
12073 arg2 =
static_cast< uint64_t
>(val2);
12074 if (arg1) (arg1)->a1 = arg2;
12075 resultobj = SWIG_Py_Void();
12082 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12083 PyObject *resultobj = 0;
12087 PyObject * obj0 = 0 ;
12090 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer32_a1_get",&obj0)) SWIG_fail;
12091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12092 if (!SWIG_IsOK(res1)) {
12093 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12096 result = (uint64_t) ((arg1)->a1);
12097 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12104 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12105 PyObject *resultobj = 0;
12110 unsigned long val2 ;
12112 PyObject * obj0 = 0 ;
12113 PyObject * obj1 = 0 ;
12115 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
12116 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12117 if (!SWIG_IsOK(res1)) {
12118 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12121 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12122 if (!SWIG_IsOK(ecode2)) {
12123 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
12125 arg2 =
static_cast< uint64_t
>(val2);
12126 if (arg1) (arg1)->a2 = arg2;
12127 resultobj = SWIG_Py_Void();
12134 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12135 PyObject *resultobj = 0;
12139 PyObject * obj0 = 0 ;
12142 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer32_a2_get",&obj0)) SWIG_fail;
12143 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12144 if (!SWIG_IsOK(res1)) {
12145 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12148 result = (uint64_t) ((arg1)->a2);
12149 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12156 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12157 PyObject *resultobj = 0;
12162 unsigned long val2 ;
12164 PyObject * obj0 = 0 ;
12165 PyObject * obj1 = 0 ;
12167 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
12168 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12169 if (!SWIG_IsOK(res1)) {
12170 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12173 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12174 if (!SWIG_IsOK(ecode2)) {
12175 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
12177 arg2 =
static_cast< uint64_t
>(val2);
12178 if (arg1) (arg1)->a3 = arg2;
12179 resultobj = SWIG_Py_Void();
12186 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12187 PyObject *resultobj = 0;
12191 PyObject * obj0 = 0 ;
12194 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputer32_a3_get",&obj0)) SWIG_fail;
12195 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12196 if (!SWIG_IsOK(res1)) {
12197 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12200 result = (uint64_t) ((arg1)->a3);
12201 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12208 SWIGINTERN PyObject *_wrap_new_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12209 PyObject *resultobj = 0;
12210 uint8_t *arg1 = (uint8_t *) 0 ;
12216 PyObject * obj0 = 0 ;
12217 PyObject * obj1 = 0 ;
12220 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_GenHammingComputer32",&obj0,&obj1)) SWIG_fail;
12221 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
12222 if (!SWIG_IsOK(res1)) {
12223 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_GenHammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
12225 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
12226 ecode2 = SWIG_AsVal_int(obj1, &val2);
12227 if (!SWIG_IsOK(ecode2)) {
12228 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_GenHammingComputer32" "', argument " "2"" of type '" "int""'");
12230 arg2 =
static_cast< int >(val2);
12232 Py_BEGIN_ALLOW_THREADS
12236 PyEval_RestoreThread(_save);
12238 if (PyErr_Occurred()) {
12241 PyErr_SetString(PyExc_RuntimeError, e.
what());
12245 Py_END_ALLOW_THREADS
12247 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_NEW | 0 );
12254 SWIGINTERN PyObject *_wrap_GenHammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12255 PyObject *resultobj = 0;
12257 uint8_t *arg2 = (uint8_t *) 0 ;
12262 PyObject * obj0 = 0 ;
12263 PyObject * obj1 = 0 ;
12266 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
12267 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12268 if (!SWIG_IsOK(res1)) {
12269 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputer32_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer32 const *""'");
12272 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12273 if (!SWIG_IsOK(res2)) {
12274 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "GenHammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
12276 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
12278 Py_BEGIN_ALLOW_THREADS
12282 PyEval_RestoreThread(_save);
12284 if (PyErr_Occurred()) {
12287 PyErr_SetString(PyExc_RuntimeError, e.
what());
12291 Py_END_ALLOW_THREADS
12293 resultobj = SWIG_From_int(static_cast< int >(result));
12300 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12301 PyObject *resultobj = 0;
12305 PyObject * obj0 = 0 ;
12307 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_GenHammingComputer32",&obj0)) SWIG_fail;
12308 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_DISOWN | 0 );
12309 if (!SWIG_IsOK(res1)) {
12310 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_GenHammingComputer32" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12314 resultobj = SWIG_Py_Void();
12321 SWIGINTERN PyObject *GenHammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12323 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
12324 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_NewClientData(obj));
12325 return SWIG_Py_Void();
12328 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12329 PyObject *resultobj = 0;
12331 uint64_t *arg2 = (uint64_t *) 0 ;
12336 PyObject * obj0 = 0 ;
12337 PyObject * obj1 = 0 ;
12339 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
12340 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12341 if (!SWIG_IsOK(res1)) {
12342 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12345 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
12346 if (!SWIG_IsOK(res2)) {
12347 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "GenHammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
12349 arg2 =
reinterpret_cast< uint64_t *
>(argp2);
12350 if (arg1) (arg1)->a = (uint64_t
const *)arg2;
12351 resultobj = SWIG_Py_Void();
12358 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12359 PyObject *resultobj = 0;
12363 PyObject * obj0 = 0 ;
12364 uint64_t *result = 0 ;
12366 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputerM8_a_get",&obj0)) SWIG_fail;
12367 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12368 if (!SWIG_IsOK(res1)) {
12369 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12372 result = (uint64_t *) ((arg1)->a);
12373 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
12380 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12381 PyObject *resultobj = 0;
12388 PyObject * obj0 = 0 ;
12389 PyObject * obj1 = 0 ;
12391 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
12392 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12393 if (!SWIG_IsOK(res1)) {
12394 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12397 ecode2 = SWIG_AsVal_int(obj1, &val2);
12398 if (!SWIG_IsOK(ecode2)) {
12399 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "GenHammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
12401 arg2 =
static_cast< int >(val2);
12402 if (arg1) (arg1)->n = arg2;
12403 resultobj = SWIG_Py_Void();
12410 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12411 PyObject *resultobj = 0;
12415 PyObject * obj0 = 0 ;
12418 if (!PyArg_ParseTuple(args,(
char *)
"O:GenHammingComputerM8_n_get",&obj0)) SWIG_fail;
12419 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12420 if (!SWIG_IsOK(res1)) {
12421 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12424 result = (int) ((arg1)->n);
12425 resultobj = SWIG_From_int(static_cast< int >(result));
12432 SWIGINTERN PyObject *_wrap_new_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12433 PyObject *resultobj = 0;
12434 uint8_t *arg1 = (uint8_t *) 0 ;
12440 PyObject * obj0 = 0 ;
12441 PyObject * obj1 = 0 ;
12444 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_GenHammingComputerM8",&obj0,&obj1)) SWIG_fail;
12445 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
12446 if (!SWIG_IsOK(res1)) {
12447 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_GenHammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
12449 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
12450 ecode2 = SWIG_AsVal_int(obj1, &val2);
12451 if (!SWIG_IsOK(ecode2)) {
12452 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_GenHammingComputerM8" "', argument " "2"" of type '" "int""'");
12454 arg2 =
static_cast< int >(val2);
12456 Py_BEGIN_ALLOW_THREADS
12460 PyEval_RestoreThread(_save);
12462 if (PyErr_Occurred()) {
12465 PyErr_SetString(PyExc_RuntimeError, e.
what());
12469 Py_END_ALLOW_THREADS
12471 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_NEW | 0 );
12478 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12479 PyObject *resultobj = 0;
12481 uint8_t *arg2 = (uint8_t *) 0 ;
12486 PyObject * obj0 = 0 ;
12487 PyObject * obj1 = 0 ;
12490 if (!PyArg_ParseTuple(args,(
char *)
"OO:GenHammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
12491 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12492 if (!SWIG_IsOK(res1)) {
12493 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "GenHammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 const *""'");
12496 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12497 if (!SWIG_IsOK(res2)) {
12498 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "GenHammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
12500 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
12502 Py_BEGIN_ALLOW_THREADS
12506 PyEval_RestoreThread(_save);
12508 if (PyErr_Occurred()) {
12511 PyErr_SetString(PyExc_RuntimeError, e.
what());
12515 Py_END_ALLOW_THREADS
12517 resultobj = SWIG_From_int(static_cast< int >(result));
12524 SWIGINTERN PyObject *_wrap_delete_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12525 PyObject *resultobj = 0;
12529 PyObject * obj0 = 0 ;
12531 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_GenHammingComputerM8",&obj0)) SWIG_fail;
12532 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_DISOWN | 0 );
12533 if (!SWIG_IsOK(res1)) {
12534 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_GenHammingComputerM8" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12538 resultobj = SWIG_Py_Void();
12545 SWIGINTERN PyObject *GenHammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12547 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
12548 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_NewClientData(obj));
12549 return SWIG_Py_Void();
12552 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12553 PyObject *resultobj = 0;
12555 uint8_t *arg2 = (uint8_t *) 0 ;
12556 uint8_t *arg3 = (uint8_t *) 0 ;
12572 PyObject * obj0 = 0 ;
12573 PyObject * obj1 = 0 ;
12574 PyObject * obj2 = 0 ;
12575 PyObject * obj3 = 0 ;
12576 PyObject * obj4 = 0 ;
12577 PyObject * obj5 = 0 ;
12579 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
12580 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12581 if (!SWIG_IsOK(res1)) {
12582 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12585 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12586 if (!SWIG_IsOK(res2)) {
12587 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12589 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
12590 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12591 if (!SWIG_IsOK(res3)) {
12592 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12594 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
12595 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12596 if (!SWIG_IsOK(ecode4)) {
12597 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12599 arg4 =
static_cast< size_t >(val4);
12600 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12601 if (!SWIG_IsOK(ecode5)) {
12602 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12604 arg5 =
static_cast< size_t >(val5);
12605 ecode6 = SWIG_AsVal_int(obj5, &val6);
12606 if (!SWIG_IsOK(ecode6)) {
12607 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "generalized_hammings_knn_hc" "', argument " "6"" of type '" "int""'");
12609 arg6 =
static_cast< int >(val6);
12611 Py_BEGIN_ALLOW_THREADS
12615 PyEval_RestoreThread(_save);
12617 if (PyErr_Occurred()) {
12620 PyErr_SetString(PyExc_RuntimeError, e.
what());
12624 Py_END_ALLOW_THREADS
12626 resultobj = SWIG_Py_Void();
12633 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12634 PyObject *resultobj = 0;
12636 uint8_t *arg2 = (uint8_t *) 0 ;
12637 uint8_t *arg3 = (uint8_t *) 0 ;
12650 PyObject * obj0 = 0 ;
12651 PyObject * obj1 = 0 ;
12652 PyObject * obj2 = 0 ;
12653 PyObject * obj3 = 0 ;
12654 PyObject * obj4 = 0 ;
12656 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
12657 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12658 if (!SWIG_IsOK(res1)) {
12659 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12662 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12663 if (!SWIG_IsOK(res2)) {
12664 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12666 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
12667 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12668 if (!SWIG_IsOK(res3)) {
12669 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12671 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
12672 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12673 if (!SWIG_IsOK(ecode4)) {
12674 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12676 arg4 =
static_cast< size_t >(val4);
12677 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12678 if (!SWIG_IsOK(ecode5)) {
12679 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12681 arg5 =
static_cast< size_t >(val5);
12683 Py_BEGIN_ALLOW_THREADS
12687 PyEval_RestoreThread(_save);
12689 if (PyErr_Occurred()) {
12692 PyErr_SetString(PyExc_RuntimeError, e.
what());
12696 Py_END_ALLOW_THREADS
12698 resultobj = SWIG_Py_Void();
12705 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc(PyObject *
self, PyObject *args) {
12707 PyObject *argv[7] = {
12712 if (!PyTuple_Check(args)) SWIG_fail;
12713 argc = args ? PyObject_Length(args) : 0;
12714 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
12715 argv[ii] = PyTuple_GET_ITEM(args,ii);
12720 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12721 _v = SWIG_CheckState(res);
12724 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12725 _v = SWIG_CheckState(res);
12728 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12729 _v = SWIG_CheckState(res);
12732 int res = SWIG_AsVal_size_t(argv[3], NULL);
12733 _v = SWIG_CheckState(res);
12737 int res = SWIG_AsVal_size_t(argv[4], NULL);
12738 _v = SWIG_CheckState(res);
12741 return _wrap_generalized_hammings_knn_hc__SWIG_1(
self, args);
12751 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12752 _v = SWIG_CheckState(res);
12755 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12756 _v = SWIG_CheckState(res);
12759 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12760 _v = SWIG_CheckState(res);
12763 int res = SWIG_AsVal_size_t(argv[3], NULL);
12764 _v = SWIG_CheckState(res);
12768 int res = SWIG_AsVal_size_t(argv[4], NULL);
12769 _v = SWIG_CheckState(res);
12773 int res = SWIG_AsVal_int(argv[5], NULL);
12774 _v = SWIG_CheckState(res);
12777 return _wrap_generalized_hammings_knn_hc__SWIG_0(
self, args);
12787 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'generalized_hammings_knn_hc'.\n"
12788 " Possible C/C++ prototypes are:\n"
12789 " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t,int)\n"
12790 " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t)\n");
12795 SWIGINTERN PyObject *_wrap_get_num_gpus(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12796 PyObject *resultobj = 0;
12799 if (!PyArg_ParseTuple(args,(
char *)
":get_num_gpus")) SWIG_fail;
12801 Py_BEGIN_ALLOW_THREADS
12803 result = (int)get_num_gpus();
12805 PyEval_RestoreThread(_save);
12807 if (PyErr_Occurred()) {
12810 PyErr_SetString(PyExc_RuntimeError, e.
what());
12814 Py_END_ALLOW_THREADS
12816 resultobj = SWIG_From_int(static_cast< int >(result));
12823 SWIGINTERN PyObject *_wrap_getmillisecs(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12824 PyObject *resultobj = 0;
12827 if (!PyArg_ParseTuple(args,(
char *)
":getmillisecs")) SWIG_fail;
12829 Py_BEGIN_ALLOW_THREADS
12833 PyEval_RestoreThread(_save);
12835 if (PyErr_Occurred()) {
12838 PyErr_SetString(PyExc_RuntimeError, e.
what());
12842 Py_END_ALLOW_THREADS
12844 resultobj = SWIG_From_double(static_cast< double >(result));
12851 SWIGINTERN PyObject *_wrap_get_mem_usage_kb(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12852 PyObject *resultobj = 0;
12855 if (!PyArg_ParseTuple(args,(
char *)
":get_mem_usage_kb")) SWIG_fail;
12857 Py_BEGIN_ALLOW_THREADS
12861 PyEval_RestoreThread(_save);
12863 if (PyErr_Occurred()) {
12866 PyErr_SetString(PyExc_RuntimeError, e.
what());
12870 Py_END_ALLOW_THREADS
12872 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
12879 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12880 PyObject *resultobj = 0;
12882 std::mt19937 arg2 ;
12887 PyObject * obj0 = 0 ;
12888 PyObject * obj1 = 0 ;
12890 if (!PyArg_ParseTuple(args,(
char *)
"OO:RandomGenerator_mt_set",&obj0,&obj1)) SWIG_fail;
12891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12892 if (!SWIG_IsOK(res1)) {
12893 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_mt_set" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12897 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__mt19937, 0 | 0);
12898 if (!SWIG_IsOK(res2)) {
12899 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
12902 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
12904 std::mt19937 * temp =
reinterpret_cast< std::mt19937 *
>(argp2);
12906 if (SWIG_IsNewObj(res2))
delete temp;
12909 if (arg1) (arg1)->mt = arg2;
12910 resultobj = SWIG_Py_Void();
12917 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12918 PyObject *resultobj = 0;
12922 PyObject * obj0 = 0 ;
12923 std::mt19937 result;
12925 if (!PyArg_ParseTuple(args,(
char *)
"O:RandomGenerator_mt_get",&obj0)) SWIG_fail;
12926 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12927 if (!SWIG_IsOK(res1)) {
12928 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_mt_get" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12931 result = ((arg1)->mt);
12932 resultobj = SWIG_NewPointerObj((
new std::mt19937(static_cast< const std::mt19937& >(result))), SWIGTYPE_p_std__mt19937, SWIG_POINTER_OWN | 0 );
12939 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12940 PyObject *resultobj = 0;
12944 PyObject * obj0 = 0 ;
12947 if (!PyArg_ParseTuple(args,(
char *)
"O:RandomGenerator_rand_int",&obj0)) SWIG_fail;
12948 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12949 if (!SWIG_IsOK(res1)) {
12950 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12954 Py_BEGIN_ALLOW_THREADS
12958 PyEval_RestoreThread(_save);
12960 if (PyErr_Occurred()) {
12963 PyErr_SetString(PyExc_RuntimeError, e.
what());
12967 Py_END_ALLOW_THREADS
12969 resultobj = SWIG_From_int(static_cast< int >(result));
12976 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_long(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
12977 PyObject *resultobj = 0;
12981 PyObject * obj0 = 0 ;
12984 if (!PyArg_ParseTuple(args,(
char *)
"O:RandomGenerator_rand_long",&obj0)) SWIG_fail;
12985 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12986 if (!SWIG_IsOK(res1)) {
12987 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_rand_long" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12991 Py_BEGIN_ALLOW_THREADS
12995 PyEval_RestoreThread(_save);
12997 if (PyErr_Occurred()) {
13000 PyErr_SetString(PyExc_RuntimeError, e.
what());
13004 Py_END_ALLOW_THREADS
13006 resultobj = SWIG_From_long(static_cast< long >(result));
13013 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13014 PyObject *resultobj = 0;
13021 PyObject * obj0 = 0 ;
13022 PyObject * obj1 = 0 ;
13025 if (!PyArg_ParseTuple(args,(
char *)
"OO:RandomGenerator_rand_int",&obj0,&obj1)) SWIG_fail;
13026 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13027 if (!SWIG_IsOK(res1)) {
13028 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13031 ecode2 = SWIG_AsVal_int(obj1, &val2);
13032 if (!SWIG_IsOK(ecode2)) {
13033 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "RandomGenerator_rand_int" "', argument " "2"" of type '" "int""'");
13035 arg2 =
static_cast< int >(val2);
13037 Py_BEGIN_ALLOW_THREADS
13039 result = (int)(arg1)->rand_int(arg2);
13041 PyEval_RestoreThread(_save);
13043 if (PyErr_Occurred()) {
13046 PyErr_SetString(PyExc_RuntimeError, e.
what());
13050 Py_END_ALLOW_THREADS
13052 resultobj = SWIG_From_int(static_cast< int >(result));
13059 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int(PyObject *
self, PyObject *args) {
13061 PyObject *argv[3] = {
13066 if (!PyTuple_Check(args)) SWIG_fail;
13067 argc = args ? PyObject_Length(args) : 0;
13068 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
13069 argv[ii] = PyTuple_GET_ITEM(args,ii);
13074 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
13075 _v = SWIG_CheckState(res);
13077 return _wrap_RandomGenerator_rand_int__SWIG_0(
self, args);
13083 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
13084 _v = SWIG_CheckState(res);
13087 int res = SWIG_AsVal_int(argv[1], NULL);
13088 _v = SWIG_CheckState(res);
13091 return _wrap_RandomGenerator_rand_int__SWIG_1(
self, args);
13097 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'RandomGenerator_rand_int'.\n"
13098 " Possible C/C++ prototypes are:\n"
13099 " faiss::RandomGenerator::rand_int()\n"
13100 " faiss::RandomGenerator::rand_int(int)\n");
13105 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_float(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13106 PyObject *resultobj = 0;
13110 PyObject * obj0 = 0 ;
13113 if (!PyArg_ParseTuple(args,(
char *)
"O:RandomGenerator_rand_float",&obj0)) SWIG_fail;
13114 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13115 if (!SWIG_IsOK(res1)) {
13116 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_rand_float" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13120 Py_BEGIN_ALLOW_THREADS
13124 PyEval_RestoreThread(_save);
13126 if (PyErr_Occurred()) {
13129 PyErr_SetString(PyExc_RuntimeError, e.
what());
13133 Py_END_ALLOW_THREADS
13135 resultobj = SWIG_From_float(static_cast< float >(result));
13142 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_double(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13143 PyObject *resultobj = 0;
13147 PyObject * obj0 = 0 ;
13150 if (!PyArg_ParseTuple(args,(
char *)
"O:RandomGenerator_rand_double",&obj0)) SWIG_fail;
13151 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13152 if (!SWIG_IsOK(res1)) {
13153 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomGenerator_rand_double" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13157 Py_BEGIN_ALLOW_THREADS
13159 result = (double)(arg1)->rand_double();
13161 PyEval_RestoreThread(_save);
13163 if (PyErr_Occurred()) {
13166 PyErr_SetString(PyExc_RuntimeError, e.
what());
13170 Py_END_ALLOW_THREADS
13172 resultobj = SWIG_From_double(static_cast< double >(result));
13179 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13180 PyObject *resultobj = 0;
13184 PyObject * obj0 = 0 ;
13187 if (!PyArg_ParseTuple(args,(
char *)
"O:new_RandomGenerator",&obj0)) SWIG_fail;
13188 ecode1 = SWIG_AsVal_long(obj0, &val1);
13189 if (!SWIG_IsOK(ecode1)) {
13190 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_RandomGenerator" "', argument " "1"" of type '" "long""'");
13192 arg1 =
static_cast< long >(val1);
13194 Py_BEGIN_ALLOW_THREADS
13198 PyEval_RestoreThread(_save);
13200 if (PyErr_Occurred()) {
13203 PyErr_SetString(PyExc_RuntimeError, e.
what());
13207 Py_END_ALLOW_THREADS
13209 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
13216 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13217 PyObject *resultobj = 0;
13220 if (!PyArg_ParseTuple(args,(
char *)
":new_RandomGenerator")) SWIG_fail;
13222 Py_BEGIN_ALLOW_THREADS
13226 PyEval_RestoreThread(_save);
13228 if (PyErr_Occurred()) {
13231 PyErr_SetString(PyExc_RuntimeError, e.
what());
13235 Py_END_ALLOW_THREADS
13237 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
13244 SWIGINTERN PyObject *_wrap_new_RandomGenerator(PyObject *
self, PyObject *args) {
13246 PyObject *argv[2] = {
13251 if (!PyTuple_Check(args)) SWIG_fail;
13252 argc = args ? PyObject_Length(args) : 0;
13253 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
13254 argv[ii] = PyTuple_GET_ITEM(args,ii);
13257 return _wrap_new_RandomGenerator__SWIG_1(
self, args);
13262 int res = SWIG_AsVal_long(argv[0], NULL);
13263 _v = SWIG_CheckState(res);
13266 return _wrap_new_RandomGenerator__SWIG_0(
self, args);
13271 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_RandomGenerator'.\n"
13272 " Possible C/C++ prototypes are:\n"
13273 " faiss::RandomGenerator::RandomGenerator(long)\n"
13274 " faiss::RandomGenerator::RandomGenerator()\n");
13279 SWIGINTERN PyObject *_wrap_delete_RandomGenerator(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13280 PyObject *resultobj = 0;
13284 PyObject * obj0 = 0 ;
13286 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_RandomGenerator",&obj0)) SWIG_fail;
13287 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_DISOWN | 0 );
13288 if (!SWIG_IsOK(res1)) {
13289 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_RandomGenerator" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13293 resultobj = SWIG_Py_Void();
13300 SWIGINTERN PyObject *RandomGenerator_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13302 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
13303 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomGenerator, SWIG_NewClientData(obj));
13304 return SWIG_Py_Void();
13307 SWIGINTERN PyObject *_wrap_float_rand(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13308 PyObject *resultobj = 0;
13309 float *arg1 = (
float *) 0 ;
13318 PyObject * obj0 = 0 ;
13319 PyObject * obj1 = 0 ;
13320 PyObject * obj2 = 0 ;
13322 if (!PyArg_ParseTuple(args,(
char *)
"OOO:float_rand",&obj0,&obj1,&obj2)) SWIG_fail;
13323 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13324 if (!SWIG_IsOK(res1)) {
13325 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "float_rand" "', argument " "1"" of type '" "float *""'");
13327 arg1 =
reinterpret_cast< float *
>(argp1);
13328 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13329 if (!SWIG_IsOK(ecode2)) {
13330 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "float_rand" "', argument " "2"" of type '" "size_t""'");
13332 arg2 =
static_cast< size_t >(val2);
13333 ecode3 = SWIG_AsVal_long(obj2, &val3);
13334 if (!SWIG_IsOK(ecode3)) {
13335 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "float_rand" "', argument " "3"" of type '" "long""'");
13337 arg3 =
static_cast< long >(val3);
13339 Py_BEGIN_ALLOW_THREADS
13341 faiss::float_rand(arg1,arg2,arg3);
13343 PyEval_RestoreThread(_save);
13345 if (PyErr_Occurred()) {
13348 PyErr_SetString(PyExc_RuntimeError, e.
what());
13352 Py_END_ALLOW_THREADS
13354 resultobj = SWIG_Py_Void();
13361 SWIGINTERN PyObject *_wrap_float_randn(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13362 PyObject *resultobj = 0;
13363 float *arg1 = (
float *) 0 ;
13372 PyObject * obj0 = 0 ;
13373 PyObject * obj1 = 0 ;
13374 PyObject * obj2 = 0 ;
13376 if (!PyArg_ParseTuple(args,(
char *)
"OOO:float_randn",&obj0,&obj1,&obj2)) SWIG_fail;
13377 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13378 if (!SWIG_IsOK(res1)) {
13379 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "float_randn" "', argument " "1"" of type '" "float *""'");
13381 arg1 =
reinterpret_cast< float *
>(argp1);
13382 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13383 if (!SWIG_IsOK(ecode2)) {
13384 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "float_randn" "', argument " "2"" of type '" "size_t""'");
13386 arg2 =
static_cast< size_t >(val2);
13387 ecode3 = SWIG_AsVal_long(obj2, &val3);
13388 if (!SWIG_IsOK(ecode3)) {
13389 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "float_randn" "', argument " "3"" of type '" "long""'");
13391 arg3 =
static_cast< long >(val3);
13393 Py_BEGIN_ALLOW_THREADS
13395 faiss::float_randn(arg1,arg2,arg3);
13397 PyEval_RestoreThread(_save);
13399 if (PyErr_Occurred()) {
13402 PyErr_SetString(PyExc_RuntimeError, e.
what());
13406 Py_END_ALLOW_THREADS
13408 resultobj = SWIG_Py_Void();
13415 SWIGINTERN PyObject *_wrap_long_rand(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13416 PyObject *resultobj = 0;
13417 long *arg1 = (
long *) 0 ;
13426 PyObject * obj0 = 0 ;
13427 PyObject * obj1 = 0 ;
13428 PyObject * obj2 = 0 ;
13430 if (!PyArg_ParseTuple(args,(
char *)
"OOO:long_rand",&obj0,&obj1,&obj2)) SWIG_fail;
13431 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 );
13432 if (!SWIG_IsOK(res1)) {
13433 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "long_rand" "', argument " "1"" of type '" "long *""'");
13435 arg1 =
reinterpret_cast< long *
>(argp1);
13436 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13437 if (!SWIG_IsOK(ecode2)) {
13438 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "long_rand" "', argument " "2"" of type '" "size_t""'");
13440 arg2 =
static_cast< size_t >(val2);
13441 ecode3 = SWIG_AsVal_long(obj2, &val3);
13442 if (!SWIG_IsOK(ecode3)) {
13443 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "long_rand" "', argument " "3"" of type '" "long""'");
13445 arg3 =
static_cast< long >(val3);
13447 Py_BEGIN_ALLOW_THREADS
13449 faiss::long_rand(arg1,arg2,arg3);
13451 PyEval_RestoreThread(_save);
13453 if (PyErr_Occurred()) {
13456 PyErr_SetString(PyExc_RuntimeError, e.
what());
13460 Py_END_ALLOW_THREADS
13462 resultobj = SWIG_Py_Void();
13469 SWIGINTERN PyObject *_wrap_byte_rand(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13470 PyObject *resultobj = 0;
13471 uint8_t *arg1 = (uint8_t *) 0 ;
13480 PyObject * obj0 = 0 ;
13481 PyObject * obj1 = 0 ;
13482 PyObject * obj2 = 0 ;
13484 if (!PyArg_ParseTuple(args,(
char *)
"OOO:byte_rand",&obj0,&obj1,&obj2)) SWIG_fail;
13485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
13486 if (!SWIG_IsOK(res1)) {
13487 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "byte_rand" "', argument " "1"" of type '" "uint8_t *""'");
13489 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
13490 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13491 if (!SWIG_IsOK(ecode2)) {
13492 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "byte_rand" "', argument " "2"" of type '" "size_t""'");
13494 arg2 =
static_cast< size_t >(val2);
13495 ecode3 = SWIG_AsVal_long(obj2, &val3);
13496 if (!SWIG_IsOK(ecode3)) {
13497 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "byte_rand" "', argument " "3"" of type '" "long""'");
13499 arg3 =
static_cast< long >(val3);
13501 Py_BEGIN_ALLOW_THREADS
13503 faiss::byte_rand(arg1,arg2,arg3);
13505 PyEval_RestoreThread(_save);
13507 if (PyErr_Occurred()) {
13510 PyErr_SetString(PyExc_RuntimeError, e.
what());
13514 Py_END_ALLOW_THREADS
13516 resultobj = SWIG_Py_Void();
13523 SWIGINTERN PyObject *_wrap_rand_perm(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13524 PyObject *resultobj = 0;
13525 int *arg1 = (
int *) 0 ;
13534 PyObject * obj0 = 0 ;
13535 PyObject * obj1 = 0 ;
13536 PyObject * obj2 = 0 ;
13538 if (!PyArg_ParseTuple(args,(
char *)
"OOO:rand_perm",&obj0,&obj1,&obj2)) SWIG_fail;
13539 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
13540 if (!SWIG_IsOK(res1)) {
13541 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "rand_perm" "', argument " "1"" of type '" "int *""'");
13543 arg1 =
reinterpret_cast< int *
>(argp1);
13544 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13545 if (!SWIG_IsOK(ecode2)) {
13546 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "rand_perm" "', argument " "2"" of type '" "size_t""'");
13548 arg2 =
static_cast< size_t >(val2);
13549 ecode3 = SWIG_AsVal_long(obj2, &val3);
13550 if (!SWIG_IsOK(ecode3)) {
13551 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "rand_perm" "', argument " "3"" of type '" "long""'");
13553 arg3 =
static_cast< long >(val3);
13555 Py_BEGIN_ALLOW_THREADS
13557 faiss::rand_perm(arg1,arg2,arg3);
13559 PyEval_RestoreThread(_save);
13561 if (PyErr_Occurred()) {
13564 PyErr_SetString(PyExc_RuntimeError, e.
what());
13568 Py_END_ALLOW_THREADS
13570 resultobj = SWIG_Py_Void();
13577 SWIGINTERN PyObject *_wrap_fvec_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13578 PyObject *resultobj = 0;
13579 float *arg1 = (
float *) 0 ;
13580 float *arg2 = (
float *) 0 ;
13588 PyObject * obj0 = 0 ;
13589 PyObject * obj1 = 0 ;
13590 PyObject * obj2 = 0 ;
13593 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec_L2sqr",&obj0,&obj1,&obj2)) SWIG_fail;
13594 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13595 if (!SWIG_IsOK(res1)) {
13596 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_L2sqr" "', argument " "1"" of type '" "float const *""'");
13598 arg1 =
reinterpret_cast< float *
>(argp1);
13599 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
13600 if (!SWIG_IsOK(res2)) {
13601 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_L2sqr" "', argument " "2"" of type '" "float const *""'");
13603 arg2 =
reinterpret_cast< float *
>(argp2);
13604 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
13605 if (!SWIG_IsOK(ecode3)) {
13606 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_L2sqr" "', argument " "3"" of type '" "size_t""'");
13608 arg3 =
static_cast< size_t >(val3);
13610 Py_BEGIN_ALLOW_THREADS
13612 result = (float)
faiss::fvec_L2sqr((
float const *)arg1,(
float const *)arg2,arg3);
13614 PyEval_RestoreThread(_save);
13616 if (PyErr_Occurred()) {
13619 PyErr_SetString(PyExc_RuntimeError, e.
what());
13623 Py_END_ALLOW_THREADS
13625 resultobj = SWIG_From_float(static_cast< float >(result));
13632 SWIGINTERN PyObject *_wrap_fvec_inner_product(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13633 PyObject *resultobj = 0;
13634 float *arg1 = (
float *) 0 ;
13635 float *arg2 = (
float *) 0 ;
13643 PyObject * obj0 = 0 ;
13644 PyObject * obj1 = 0 ;
13645 PyObject * obj2 = 0 ;
13648 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec_inner_product",&obj0,&obj1,&obj2)) SWIG_fail;
13649 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13650 if (!SWIG_IsOK(res1)) {
13651 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_inner_product" "', argument " "1"" of type '" "float const *""'");
13653 arg1 =
reinterpret_cast< float *
>(argp1);
13654 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
13655 if (!SWIG_IsOK(res2)) {
13656 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_inner_product" "', argument " "2"" of type '" "float const *""'");
13658 arg2 =
reinterpret_cast< float *
>(argp2);
13659 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
13660 if (!SWIG_IsOK(ecode3)) {
13661 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_inner_product" "', argument " "3"" of type '" "size_t""'");
13663 arg3 =
static_cast< size_t >(val3);
13665 Py_BEGIN_ALLOW_THREADS
13667 result = (float)faiss::fvec_inner_product((
float const *)arg1,(
float const *)arg2,arg3);
13669 PyEval_RestoreThread(_save);
13671 if (PyErr_Occurred()) {
13674 PyErr_SetString(PyExc_RuntimeError, e.
what());
13678 Py_END_ALLOW_THREADS
13680 resultobj = SWIG_From_float(static_cast< float >(result));
13687 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13688 PyObject *resultobj = 0;
13691 long *arg3 = (
long *) 0 ;
13698 PyObject * obj0 = 0 ;
13699 PyObject * obj1 = 0 ;
13700 PyObject * obj2 = 0 ;
13703 if (!PyArg_ParseTuple(args,(
char *)
"OOO:imbalance_factor",&obj0,&obj1,&obj2)) SWIG_fail;
13704 ecode1 = SWIG_AsVal_int(obj0, &val1);
13705 if (!SWIG_IsOK(ecode1)) {
13706 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
13708 arg1 =
static_cast< int >(val1);
13709 ecode2 = SWIG_AsVal_int(obj1, &val2);
13710 if (!SWIG_IsOK(ecode2)) {
13711 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "imbalance_factor" "', argument " "2"" of type '" "int""'");
13713 arg2 =
static_cast< int >(val2);
13714 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
13715 if (!SWIG_IsOK(res3)) {
13716 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "imbalance_factor" "', argument " "3"" of type '" "long const *""'");
13718 arg3 =
reinterpret_cast< long *
>(argp3);
13720 Py_BEGIN_ALLOW_THREADS
13722 result = (double)faiss::imbalance_factor(arg1,arg2,(
long const *)arg3);
13724 PyEval_RestoreThread(_save);
13726 if (PyErr_Occurred()) {
13729 PyErr_SetString(PyExc_RuntimeError, e.
what());
13733 Py_END_ALLOW_THREADS
13735 resultobj = SWIG_From_double(static_cast< double >(result));
13742 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13743 PyObject *resultobj = 0;
13745 int *arg2 = (
int *) 0 ;
13750 PyObject * obj0 = 0 ;
13751 PyObject * obj1 = 0 ;
13754 if (!PyArg_ParseTuple(args,(
char *)
"OO:imbalance_factor",&obj0,&obj1)) SWIG_fail;
13755 ecode1 = SWIG_AsVal_int(obj0, &val1);
13756 if (!SWIG_IsOK(ecode1)) {
13757 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
13759 arg1 =
static_cast< int >(val1);
13760 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
13761 if (!SWIG_IsOK(res2)) {
13762 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "imbalance_factor" "', argument " "2"" of type '" "int const *""'");
13764 arg2 =
reinterpret_cast< int *
>(argp2);
13766 Py_BEGIN_ALLOW_THREADS
13768 result = (double)faiss::imbalance_factor(arg1,(
int const *)arg2);
13770 PyEval_RestoreThread(_save);
13772 if (PyErr_Occurred()) {
13775 PyErr_SetString(PyExc_RuntimeError, e.
what());
13779 Py_END_ALLOW_THREADS
13781 resultobj = SWIG_From_double(static_cast< double >(result));
13788 SWIGINTERN PyObject *_wrap_imbalance_factor(PyObject *
self, PyObject *args) {
13790 PyObject *argv[4] = {
13795 if (!PyTuple_Check(args)) SWIG_fail;
13796 argc = args ? PyObject_Length(args) : 0;
13797 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
13798 argv[ii] = PyTuple_GET_ITEM(args,ii);
13803 int res = SWIG_AsVal_int(argv[0], NULL);
13804 _v = SWIG_CheckState(res);
13808 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
13809 _v = SWIG_CheckState(res);
13811 return _wrap_imbalance_factor__SWIG_1(
self, args);
13818 int res = SWIG_AsVal_int(argv[0], NULL);
13819 _v = SWIG_CheckState(res);
13823 int res = SWIG_AsVal_int(argv[1], NULL);
13824 _v = SWIG_CheckState(res);
13828 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
13829 _v = SWIG_CheckState(res);
13831 return _wrap_imbalance_factor__SWIG_0(
self, args);
13838 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'imbalance_factor'.\n"
13839 " Possible C/C++ prototypes are:\n"
13840 " faiss::imbalance_factor(int,int,long const *)\n"
13841 " faiss::imbalance_factor(int,int const *)\n");
13846 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13847 PyObject *resultobj = 0;
13850 float *arg3 = (
float *) 0 ;
13852 float *arg5 = (
float *) 0 ;
13853 float *arg6 = (
float *) 0 ;
13875 PyObject * obj0 = 0 ;
13876 PyObject * obj1 = 0 ;
13877 PyObject * obj2 = 0 ;
13878 PyObject * obj3 = 0 ;
13879 PyObject * obj4 = 0 ;
13880 PyObject * obj5 = 0 ;
13881 PyObject * obj6 = 0 ;
13882 PyObject * obj7 = 0 ;
13883 PyObject * obj8 = 0 ;
13885 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
13886 ecode1 = SWIG_AsVal_long(obj0, &val1);
13887 if (!SWIG_IsOK(ecode1)) {
13888 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13890 arg1 =
static_cast< long >(val1);
13891 ecode2 = SWIG_AsVal_long(obj1, &val2);
13892 if (!SWIG_IsOK(ecode2)) {
13893 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13895 arg2 =
static_cast< long >(val2);
13896 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
13897 if (!SWIG_IsOK(res3)) {
13898 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
13900 arg3 =
reinterpret_cast< float *
>(argp3);
13901 ecode4 = SWIG_AsVal_long(obj3, &val4);
13902 if (!SWIG_IsOK(ecode4)) {
13903 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
13905 arg4 =
static_cast< long >(val4);
13906 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
13907 if (!SWIG_IsOK(res5)) {
13908 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
13910 arg5 =
reinterpret_cast< float *
>(argp5);
13911 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
13912 if (!SWIG_IsOK(res6)) {
13913 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
13915 arg6 =
reinterpret_cast< float *
>(argp6);
13916 ecode7 = SWIG_AsVal_long(obj6, &val7);
13917 if (!SWIG_IsOK(ecode7)) {
13918 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
13920 arg7 =
static_cast< long >(val7);
13921 ecode8 = SWIG_AsVal_long(obj7, &val8);
13922 if (!SWIG_IsOK(ecode8)) {
13923 SWIG_exception_fail(SWIG_ArgError(ecode8),
"in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
13925 arg8 =
static_cast< long >(val8);
13926 ecode9 = SWIG_AsVal_long(obj8, &val9);
13927 if (!SWIG_IsOK(ecode9)) {
13928 SWIG_exception_fail(SWIG_ArgError(ecode9),
"in method '" "pairwise_L2sqr" "', argument " "9"" of type '" "long""'");
13930 arg9 =
static_cast< long >(val9);
13932 Py_BEGIN_ALLOW_THREADS
13936 PyEval_RestoreThread(_save);
13938 if (PyErr_Occurred()) {
13941 PyErr_SetString(PyExc_RuntimeError, e.
what());
13945 Py_END_ALLOW_THREADS
13947 resultobj = SWIG_Py_Void();
13954 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
13955 PyObject *resultobj = 0;
13958 float *arg3 = (
float *) 0 ;
13960 float *arg5 = (
float *) 0 ;
13961 float *arg6 = (
float *) 0 ;
13980 PyObject * obj0 = 0 ;
13981 PyObject * obj1 = 0 ;
13982 PyObject * obj2 = 0 ;
13983 PyObject * obj3 = 0 ;
13984 PyObject * obj4 = 0 ;
13985 PyObject * obj5 = 0 ;
13986 PyObject * obj6 = 0 ;
13987 PyObject * obj7 = 0 ;
13989 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
13990 ecode1 = SWIG_AsVal_long(obj0, &val1);
13991 if (!SWIG_IsOK(ecode1)) {
13992 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13994 arg1 =
static_cast< long >(val1);
13995 ecode2 = SWIG_AsVal_long(obj1, &val2);
13996 if (!SWIG_IsOK(ecode2)) {
13997 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13999 arg2 =
static_cast< long >(val2);
14000 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14001 if (!SWIG_IsOK(res3)) {
14002 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
14004 arg3 =
reinterpret_cast< float *
>(argp3);
14005 ecode4 = SWIG_AsVal_long(obj3, &val4);
14006 if (!SWIG_IsOK(ecode4)) {
14007 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
14009 arg4 =
static_cast< long >(val4);
14010 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
14011 if (!SWIG_IsOK(res5)) {
14012 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
14014 arg5 =
reinterpret_cast< float *
>(argp5);
14015 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
14016 if (!SWIG_IsOK(res6)) {
14017 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
14019 arg6 =
reinterpret_cast< float *
>(argp6);
14020 ecode7 = SWIG_AsVal_long(obj6, &val7);
14021 if (!SWIG_IsOK(ecode7)) {
14022 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
14024 arg7 =
static_cast< long >(val7);
14025 ecode8 = SWIG_AsVal_long(obj7, &val8);
14026 if (!SWIG_IsOK(ecode8)) {
14027 SWIG_exception_fail(SWIG_ArgError(ecode8),
"in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
14029 arg8 =
static_cast< long >(val8);
14031 Py_BEGIN_ALLOW_THREADS
14035 PyEval_RestoreThread(_save);
14037 if (PyErr_Occurred()) {
14040 PyErr_SetString(PyExc_RuntimeError, e.
what());
14044 Py_END_ALLOW_THREADS
14046 resultobj = SWIG_Py_Void();
14053 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14054 PyObject *resultobj = 0;
14057 float *arg3 = (
float *) 0 ;
14059 float *arg5 = (
float *) 0 ;
14060 float *arg6 = (
float *) 0 ;
14076 PyObject * obj0 = 0 ;
14077 PyObject * obj1 = 0 ;
14078 PyObject * obj2 = 0 ;
14079 PyObject * obj3 = 0 ;
14080 PyObject * obj4 = 0 ;
14081 PyObject * obj5 = 0 ;
14082 PyObject * obj6 = 0 ;
14084 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14085 ecode1 = SWIG_AsVal_long(obj0, &val1);
14086 if (!SWIG_IsOK(ecode1)) {
14087 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
14089 arg1 =
static_cast< long >(val1);
14090 ecode2 = SWIG_AsVal_long(obj1, &val2);
14091 if (!SWIG_IsOK(ecode2)) {
14092 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
14094 arg2 =
static_cast< long >(val2);
14095 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14096 if (!SWIG_IsOK(res3)) {
14097 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
14099 arg3 =
reinterpret_cast< float *
>(argp3);
14100 ecode4 = SWIG_AsVal_long(obj3, &val4);
14101 if (!SWIG_IsOK(ecode4)) {
14102 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
14104 arg4 =
static_cast< long >(val4);
14105 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
14106 if (!SWIG_IsOK(res5)) {
14107 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
14109 arg5 =
reinterpret_cast< float *
>(argp5);
14110 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
14111 if (!SWIG_IsOK(res6)) {
14112 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
14114 arg6 =
reinterpret_cast< float *
>(argp6);
14115 ecode7 = SWIG_AsVal_long(obj6, &val7);
14116 if (!SWIG_IsOK(ecode7)) {
14117 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
14119 arg7 =
static_cast< long >(val7);
14121 Py_BEGIN_ALLOW_THREADS
14125 PyEval_RestoreThread(_save);
14127 if (PyErr_Occurred()) {
14130 PyErr_SetString(PyExc_RuntimeError, e.
what());
14134 Py_END_ALLOW_THREADS
14136 resultobj = SWIG_Py_Void();
14143 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_3(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14144 PyObject *resultobj = 0;
14147 float *arg3 = (
float *) 0 ;
14149 float *arg5 = (
float *) 0 ;
14150 float *arg6 = (
float *) 0 ;
14163 PyObject * obj0 = 0 ;
14164 PyObject * obj1 = 0 ;
14165 PyObject * obj2 = 0 ;
14166 PyObject * obj3 = 0 ;
14167 PyObject * obj4 = 0 ;
14168 PyObject * obj5 = 0 ;
14170 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
14171 ecode1 = SWIG_AsVal_long(obj0, &val1);
14172 if (!SWIG_IsOK(ecode1)) {
14173 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
14175 arg1 =
static_cast< long >(val1);
14176 ecode2 = SWIG_AsVal_long(obj1, &val2);
14177 if (!SWIG_IsOK(ecode2)) {
14178 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
14180 arg2 =
static_cast< long >(val2);
14181 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14182 if (!SWIG_IsOK(res3)) {
14183 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
14185 arg3 =
reinterpret_cast< float *
>(argp3);
14186 ecode4 = SWIG_AsVal_long(obj3, &val4);
14187 if (!SWIG_IsOK(ecode4)) {
14188 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
14190 arg4 =
static_cast< long >(val4);
14191 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
14192 if (!SWIG_IsOK(res5)) {
14193 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
14195 arg5 =
reinterpret_cast< float *
>(argp5);
14196 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
14197 if (!SWIG_IsOK(res6)) {
14198 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
14200 arg6 =
reinterpret_cast< float *
>(argp6);
14202 Py_BEGIN_ALLOW_THREADS
14206 PyEval_RestoreThread(_save);
14208 if (PyErr_Occurred()) {
14211 PyErr_SetString(PyExc_RuntimeError, e.
what());
14215 Py_END_ALLOW_THREADS
14217 resultobj = SWIG_Py_Void();
14224 SWIGINTERN PyObject *_wrap_pairwise_L2sqr(PyObject *
self, PyObject *args) {
14226 PyObject *argv[10] = {
14231 if (!PyTuple_Check(args)) SWIG_fail;
14232 argc = args ? PyObject_Length(args) : 0;
14233 for (ii = 0; (ii < 9) && (ii < argc); ii++) {
14234 argv[ii] = PyTuple_GET_ITEM(args,ii);
14239 int res = SWIG_AsVal_long(argv[0], NULL);
14240 _v = SWIG_CheckState(res);
14244 int res = SWIG_AsVal_long(argv[1], NULL);
14245 _v = SWIG_CheckState(res);
14249 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
14250 _v = SWIG_CheckState(res);
14253 int res = SWIG_AsVal_long(argv[3], NULL);
14254 _v = SWIG_CheckState(res);
14258 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
14259 _v = SWIG_CheckState(res);
14262 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
14263 _v = SWIG_CheckState(res);
14265 return _wrap_pairwise_L2sqr__SWIG_3(
self, args);
14276 int res = SWIG_AsVal_long(argv[0], NULL);
14277 _v = SWIG_CheckState(res);
14281 int res = SWIG_AsVal_long(argv[1], NULL);
14282 _v = SWIG_CheckState(res);
14286 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
14287 _v = SWIG_CheckState(res);
14290 int res = SWIG_AsVal_long(argv[3], NULL);
14291 _v = SWIG_CheckState(res);
14295 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
14296 _v = SWIG_CheckState(res);
14299 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
14300 _v = SWIG_CheckState(res);
14303 int res = SWIG_AsVal_long(argv[6], NULL);
14304 _v = SWIG_CheckState(res);
14307 return _wrap_pairwise_L2sqr__SWIG_2(
self, args);
14319 int res = SWIG_AsVal_long(argv[0], NULL);
14320 _v = SWIG_CheckState(res);
14324 int res = SWIG_AsVal_long(argv[1], NULL);
14325 _v = SWIG_CheckState(res);
14329 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
14330 _v = SWIG_CheckState(res);
14333 int res = SWIG_AsVal_long(argv[3], NULL);
14334 _v = SWIG_CheckState(res);
14338 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
14339 _v = SWIG_CheckState(res);
14342 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
14343 _v = SWIG_CheckState(res);
14346 int res = SWIG_AsVal_long(argv[6], NULL);
14347 _v = SWIG_CheckState(res);
14351 int res = SWIG_AsVal_long(argv[7], NULL);
14352 _v = SWIG_CheckState(res);
14355 return _wrap_pairwise_L2sqr__SWIG_1(
self, args);
14368 int res = SWIG_AsVal_long(argv[0], NULL);
14369 _v = SWIG_CheckState(res);
14373 int res = SWIG_AsVal_long(argv[1], NULL);
14374 _v = SWIG_CheckState(res);
14378 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
14379 _v = SWIG_CheckState(res);
14382 int res = SWIG_AsVal_long(argv[3], NULL);
14383 _v = SWIG_CheckState(res);
14387 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
14388 _v = SWIG_CheckState(res);
14391 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
14392 _v = SWIG_CheckState(res);
14395 int res = SWIG_AsVal_long(argv[6], NULL);
14396 _v = SWIG_CheckState(res);
14400 int res = SWIG_AsVal_long(argv[7], NULL);
14401 _v = SWIG_CheckState(res);
14405 int res = SWIG_AsVal_long(argv[8], NULL);
14406 _v = SWIG_CheckState(res);
14409 return _wrap_pairwise_L2sqr__SWIG_0(
self, args);
14422 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'pairwise_L2sqr'.\n"
14423 " Possible C/C++ prototypes are:\n"
14424 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long,long)\n"
14425 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long)\n"
14426 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long)\n"
14427 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *)\n");
14432 SWIGINTERN PyObject *_wrap_fvec_inner_products_ny(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14433 PyObject *resultobj = 0;
14434 float *arg1 = (
float *) 0 ;
14435 float *arg2 = (
float *) 0 ;
14436 float *arg3 = (
float *) 0 ;
14449 PyObject * obj0 = 0 ;
14450 PyObject * obj1 = 0 ;
14451 PyObject * obj2 = 0 ;
14452 PyObject * obj3 = 0 ;
14453 PyObject * obj4 = 0 ;
14455 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:fvec_inner_products_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14456 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14457 if (!SWIG_IsOK(res1)) {
14458 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_inner_products_ny" "', argument " "1"" of type '" "float *""'");
14460 arg1 =
reinterpret_cast< float *
>(argp1);
14461 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14462 if (!SWIG_IsOK(res2)) {
14463 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_inner_products_ny" "', argument " "2"" of type '" "float const *""'");
14465 arg2 =
reinterpret_cast< float *
>(argp2);
14466 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14467 if (!SWIG_IsOK(res3)) {
14468 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_inner_products_ny" "', argument " "3"" of type '" "float const *""'");
14470 arg3 =
reinterpret_cast< float *
>(argp3);
14471 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14472 if (!SWIG_IsOK(ecode4)) {
14473 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "fvec_inner_products_ny" "', argument " "4"" of type '" "size_t""'");
14475 arg4 =
static_cast< size_t >(val4);
14476 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14477 if (!SWIG_IsOK(ecode5)) {
14478 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvec_inner_products_ny" "', argument " "5"" of type '" "size_t""'");
14480 arg5 =
static_cast< size_t >(val5);
14482 Py_BEGIN_ALLOW_THREADS
14484 faiss::fvec_inner_products_ny(arg1,(
float const *)arg2,(
float const *)arg3,arg4,arg5);
14486 PyEval_RestoreThread(_save);
14488 if (PyErr_Occurred()) {
14491 PyErr_SetString(PyExc_RuntimeError, e.
what());
14495 Py_END_ALLOW_THREADS
14497 resultobj = SWIG_Py_Void();
14504 SWIGINTERN PyObject *_wrap_fvec_L2sqr_ny(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14505 PyObject *resultobj = 0;
14506 float *arg1 = (
float *) 0 ;
14507 float *arg2 = (
float *) 0 ;
14508 float *arg3 = (
float *) 0 ;
14521 PyObject * obj0 = 0 ;
14522 PyObject * obj1 = 0 ;
14523 PyObject * obj2 = 0 ;
14524 PyObject * obj3 = 0 ;
14525 PyObject * obj4 = 0 ;
14527 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:fvec_L2sqr_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14528 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14529 if (!SWIG_IsOK(res1)) {
14530 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_L2sqr_ny" "', argument " "1"" of type '" "float *""'");
14532 arg1 =
reinterpret_cast< float *
>(argp1);
14533 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14534 if (!SWIG_IsOK(res2)) {
14535 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_L2sqr_ny" "', argument " "2"" of type '" "float const *""'");
14537 arg2 =
reinterpret_cast< float *
>(argp2);
14538 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14539 if (!SWIG_IsOK(res3)) {
14540 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_L2sqr_ny" "', argument " "3"" of type '" "float const *""'");
14542 arg3 =
reinterpret_cast< float *
>(argp3);
14543 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14544 if (!SWIG_IsOK(ecode4)) {
14545 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "fvec_L2sqr_ny" "', argument " "4"" of type '" "size_t""'");
14547 arg4 =
static_cast< size_t >(val4);
14548 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14549 if (!SWIG_IsOK(ecode5)) {
14550 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvec_L2sqr_ny" "', argument " "5"" of type '" "size_t""'");
14552 arg5 =
static_cast< size_t >(val5);
14554 Py_BEGIN_ALLOW_THREADS
14556 faiss::fvec_L2sqr_ny(arg1,(
float const *)arg2,(
float const *)arg3,arg4,arg5);
14558 PyEval_RestoreThread(_save);
14560 if (PyErr_Occurred()) {
14563 PyErr_SetString(PyExc_RuntimeError, e.
what());
14567 Py_END_ALLOW_THREADS
14569 resultobj = SWIG_Py_Void();
14576 SWIGINTERN PyObject *_wrap_fvec_norm_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14577 PyObject *resultobj = 0;
14578 float *arg1 = (
float *) 0 ;
14584 PyObject * obj0 = 0 ;
14585 PyObject * obj1 = 0 ;
14588 if (!PyArg_ParseTuple(args,(
char *)
"OO:fvec_norm_L2sqr",&obj0,&obj1)) SWIG_fail;
14589 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14590 if (!SWIG_IsOK(res1)) {
14591 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_norm_L2sqr" "', argument " "1"" of type '" "float const *""'");
14593 arg1 =
reinterpret_cast< float *
>(argp1);
14594 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14595 if (!SWIG_IsOK(ecode2)) {
14596 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "fvec_norm_L2sqr" "', argument " "2"" of type '" "size_t""'");
14598 arg2 =
static_cast< size_t >(val2);
14600 Py_BEGIN_ALLOW_THREADS
14604 PyEval_RestoreThread(_save);
14606 if (PyErr_Occurred()) {
14609 PyErr_SetString(PyExc_RuntimeError, e.
what());
14613 Py_END_ALLOW_THREADS
14615 resultobj = SWIG_From_float(static_cast< float >(result));
14622 SWIGINTERN PyObject *_wrap_fvec_norms_L2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14623 PyObject *resultobj = 0;
14624 float *arg1 = (
float *) 0 ;
14625 float *arg2 = (
float *) 0 ;
14636 PyObject * obj0 = 0 ;
14637 PyObject * obj1 = 0 ;
14638 PyObject * obj2 = 0 ;
14639 PyObject * obj3 = 0 ;
14641 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:fvec_norms_L2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
14642 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14643 if (!SWIG_IsOK(res1)) {
14644 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_norms_L2" "', argument " "1"" of type '" "float *""'");
14646 arg1 =
reinterpret_cast< float *
>(argp1);
14647 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14648 if (!SWIG_IsOK(res2)) {
14649 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_norms_L2" "', argument " "2"" of type '" "float const *""'");
14651 arg2 =
reinterpret_cast< float *
>(argp2);
14652 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14653 if (!SWIG_IsOK(ecode3)) {
14654 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_norms_L2" "', argument " "3"" of type '" "size_t""'");
14656 arg3 =
static_cast< size_t >(val3);
14657 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14658 if (!SWIG_IsOK(ecode4)) {
14659 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "fvec_norms_L2" "', argument " "4"" of type '" "size_t""'");
14661 arg4 =
static_cast< size_t >(val4);
14663 Py_BEGIN_ALLOW_THREADS
14667 PyEval_RestoreThread(_save);
14669 if (PyErr_Occurred()) {
14672 PyErr_SetString(PyExc_RuntimeError, e.
what());
14676 Py_END_ALLOW_THREADS
14678 resultobj = SWIG_Py_Void();
14685 SWIGINTERN PyObject *_wrap_fvec_norms_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14686 PyObject *resultobj = 0;
14687 float *arg1 = (
float *) 0 ;
14688 float *arg2 = (
float *) 0 ;
14699 PyObject * obj0 = 0 ;
14700 PyObject * obj1 = 0 ;
14701 PyObject * obj2 = 0 ;
14702 PyObject * obj3 = 0 ;
14704 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:fvec_norms_L2sqr",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
14705 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14706 if (!SWIG_IsOK(res1)) {
14707 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_norms_L2sqr" "', argument " "1"" of type '" "float *""'");
14709 arg1 =
reinterpret_cast< float *
>(argp1);
14710 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14711 if (!SWIG_IsOK(res2)) {
14712 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_norms_L2sqr" "', argument " "2"" of type '" "float const *""'");
14714 arg2 =
reinterpret_cast< float *
>(argp2);
14715 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14716 if (!SWIG_IsOK(ecode3)) {
14717 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_norms_L2sqr" "', argument " "3"" of type '" "size_t""'");
14719 arg3 =
static_cast< size_t >(val3);
14720 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14721 if (!SWIG_IsOK(ecode4)) {
14722 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "fvec_norms_L2sqr" "', argument " "4"" of type '" "size_t""'");
14724 arg4 =
static_cast< size_t >(val4);
14726 Py_BEGIN_ALLOW_THREADS
14730 PyEval_RestoreThread(_save);
14732 if (PyErr_Occurred()) {
14735 PyErr_SetString(PyExc_RuntimeError, e.
what());
14739 Py_END_ALLOW_THREADS
14741 resultobj = SWIG_Py_Void();
14748 SWIGINTERN PyObject *_wrap_fvec_renorm_L2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14749 PyObject *resultobj = 0;
14752 float *arg3 = (
float *) 0 ;
14759 PyObject * obj0 = 0 ;
14760 PyObject * obj1 = 0 ;
14761 PyObject * obj2 = 0 ;
14763 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec_renorm_L2",&obj0,&obj1,&obj2)) SWIG_fail;
14764 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
14765 if (!SWIG_IsOK(ecode1)) {
14766 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvec_renorm_L2" "', argument " "1"" of type '" "size_t""'");
14768 arg1 =
static_cast< size_t >(val1);
14769 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14770 if (!SWIG_IsOK(ecode2)) {
14771 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "fvec_renorm_L2" "', argument " "2"" of type '" "size_t""'");
14773 arg2 =
static_cast< size_t >(val2);
14774 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14775 if (!SWIG_IsOK(res3)) {
14776 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_renorm_L2" "', argument " "3"" of type '" "float *""'");
14778 arg3 =
reinterpret_cast< float *
>(argp3);
14780 Py_BEGIN_ALLOW_THREADS
14782 faiss::fvec_renorm_L2(arg1,arg2,arg3);
14784 PyEval_RestoreThread(_save);
14786 if (PyErr_Occurred()) {
14789 PyErr_SetString(PyExc_RuntimeError, e.
what());
14793 Py_END_ALLOW_THREADS
14795 resultobj = SWIG_Py_Void();
14802 SWIGINTERN PyObject *_wrap_inner_product_to_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14803 PyObject *resultobj = 0;
14804 float *arg1 = (
float *) 0 ;
14805 float *arg2 = (
float *) 0 ;
14806 float *arg3 = (
float *) 0 ;
14819 PyObject * obj0 = 0 ;
14820 PyObject * obj1 = 0 ;
14821 PyObject * obj2 = 0 ;
14822 PyObject * obj3 = 0 ;
14823 PyObject * obj4 = 0 ;
14825 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:inner_product_to_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14826 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14827 if (!SWIG_IsOK(res1)) {
14828 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "inner_product_to_L2sqr" "', argument " "1"" of type '" "float *""'");
14830 arg1 =
reinterpret_cast< float *
>(argp1);
14831 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14832 if (!SWIG_IsOK(res2)) {
14833 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "inner_product_to_L2sqr" "', argument " "2"" of type '" "float const *""'");
14835 arg2 =
reinterpret_cast< float *
>(argp2);
14836 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14837 if (!SWIG_IsOK(res3)) {
14838 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "inner_product_to_L2sqr" "', argument " "3"" of type '" "float const *""'");
14840 arg3 =
reinterpret_cast< float *
>(argp3);
14841 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14842 if (!SWIG_IsOK(ecode4)) {
14843 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "inner_product_to_L2sqr" "', argument " "4"" of type '" "size_t""'");
14845 arg4 =
static_cast< size_t >(val4);
14846 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14847 if (!SWIG_IsOK(ecode5)) {
14848 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "inner_product_to_L2sqr" "', argument " "5"" of type '" "size_t""'");
14850 arg5 =
static_cast< size_t >(val5);
14852 Py_BEGIN_ALLOW_THREADS
14854 faiss::inner_product_to_L2sqr(arg1,(
float const *)arg2,(
float const *)arg3,arg4,arg5);
14856 PyEval_RestoreThread(_save);
14858 if (PyErr_Occurred()) {
14861 PyErr_SetString(PyExc_RuntimeError, e.
what());
14865 Py_END_ALLOW_THREADS
14867 resultobj = SWIG_Py_Void();
14874 SWIGINTERN PyObject *_wrap_fvec_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14875 PyObject *resultobj = 0;
14876 float *arg1 = (
float *) 0 ;
14877 float *arg2 = (
float *) 0 ;
14878 float *arg3 = (
float *) 0 ;
14879 long *arg4 = (
long *) 0 ;
14897 PyObject * obj0 = 0 ;
14898 PyObject * obj1 = 0 ;
14899 PyObject * obj2 = 0 ;
14900 PyObject * obj3 = 0 ;
14901 PyObject * obj4 = 0 ;
14902 PyObject * obj5 = 0 ;
14903 PyObject * obj6 = 0 ;
14905 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:fvec_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14906 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14907 if (!SWIG_IsOK(res1)) {
14908 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_inner_products_by_idx" "', argument " "1"" of type '" "float *""'");
14910 arg1 =
reinterpret_cast< float *
>(argp1);
14911 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14912 if (!SWIG_IsOK(res2)) {
14913 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
14915 arg2 =
reinterpret_cast< float *
>(argp2);
14916 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14917 if (!SWIG_IsOK(res3)) {
14918 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_inner_products_by_idx" "', argument " "3"" of type '" "float const *""'");
14920 arg3 =
reinterpret_cast< float *
>(argp3);
14921 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
14922 if (!SWIG_IsOK(res4)) {
14923 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvec_inner_products_by_idx" "', argument " "4"" of type '" "long const *""'");
14925 arg4 =
reinterpret_cast< long *
>(argp4);
14926 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14927 if (!SWIG_IsOK(ecode5)) {
14928 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvec_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
14930 arg5 =
static_cast< size_t >(val5);
14931 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
14932 if (!SWIG_IsOK(ecode6)) {
14933 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "fvec_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
14935 arg6 =
static_cast< size_t >(val6);
14936 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
14937 if (!SWIG_IsOK(ecode7)) {
14938 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "fvec_inner_products_by_idx" "', argument " "7"" of type '" "size_t""'");
14940 arg7 =
static_cast< size_t >(val7);
14942 Py_BEGIN_ALLOW_THREADS
14944 faiss::fvec_inner_products_by_idx(arg1,(
float const *)arg2,(
float const *)arg3,(
long const *)arg4,arg5,arg6,arg7);
14946 PyEval_RestoreThread(_save);
14948 if (PyErr_Occurred()) {
14951 PyErr_SetString(PyExc_RuntimeError, e.
what());
14955 Py_END_ALLOW_THREADS
14957 resultobj = SWIG_Py_Void();
14964 SWIGINTERN PyObject *_wrap_fvec_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
14965 PyObject *resultobj = 0;
14966 float *arg1 = (
float *) 0 ;
14967 float *arg2 = (
float *) 0 ;
14968 float *arg3 = (
float *) 0 ;
14969 long *arg4 = (
long *) 0 ;
14987 PyObject * obj0 = 0 ;
14988 PyObject * obj1 = 0 ;
14989 PyObject * obj2 = 0 ;
14990 PyObject * obj3 = 0 ;
14991 PyObject * obj4 = 0 ;
14992 PyObject * obj5 = 0 ;
14993 PyObject * obj6 = 0 ;
14995 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:fvec_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14996 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14997 if (!SWIG_IsOK(res1)) {
14998 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "fvec_L2sqr_by_idx" "', argument " "1"" of type '" "float *""'");
15000 arg1 =
reinterpret_cast< float *
>(argp1);
15001 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15002 if (!SWIG_IsOK(res2)) {
15003 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
15005 arg2 =
reinterpret_cast< float *
>(argp2);
15006 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15007 if (!SWIG_IsOK(res3)) {
15008 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_L2sqr_by_idx" "', argument " "3"" of type '" "float const *""'");
15010 arg3 =
reinterpret_cast< float *
>(argp3);
15011 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
15012 if (!SWIG_IsOK(res4)) {
15013 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvec_L2sqr_by_idx" "', argument " "4"" of type '" "long const *""'");
15015 arg4 =
reinterpret_cast< long *
>(argp4);
15016 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15017 if (!SWIG_IsOK(ecode5)) {
15018 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvec_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
15020 arg5 =
static_cast< size_t >(val5);
15021 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15022 if (!SWIG_IsOK(ecode6)) {
15023 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "fvec_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
15025 arg6 =
static_cast< size_t >(val6);
15026 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
15027 if (!SWIG_IsOK(ecode7)) {
15028 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "fvec_L2sqr_by_idx" "', argument " "7"" of type '" "size_t""'");
15030 arg7 =
static_cast< size_t >(val7);
15032 Py_BEGIN_ALLOW_THREADS
15034 faiss::fvec_L2sqr_by_idx(arg1,(
float const *)arg2,(
float const *)arg3,(
long const *)arg4,arg5,arg6,arg7);
15036 PyEval_RestoreThread(_save);
15038 if (PyErr_Occurred()) {
15041 PyErr_SetString(PyExc_RuntimeError, e.
what());
15045 Py_END_ALLOW_THREADS
15047 resultobj = SWIG_Py_Void();
15054 SWIGINTERN
int Swig_var_distance_compute_blas_threshold_set(PyObject *_val) {
15057 int res = SWIG_AsVal_int(_val, &val);
15058 if (!SWIG_IsOK(res)) {
15059 SWIG_exception_fail(SWIG_ArgError(res),
"in variable '""faiss::distance_compute_blas_threshold""' of type '""int""'");
15061 faiss::distance_compute_blas_threshold =
static_cast< int >(val);
15069 SWIGINTERN PyObject *Swig_var_distance_compute_blas_threshold_get(
void) {
15070 PyObject *pyobj = 0;
15072 pyobj = SWIG_From_int(static_cast< int >(faiss::distance_compute_blas_threshold));
15077 SWIGINTERN PyObject *_wrap_knn_inner_product(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15078 PyObject *resultobj = 0;
15079 float *arg1 = (
float *) 0 ;
15080 float *arg2 = (
float *) 0 ;
15097 PyObject * obj0 = 0 ;
15098 PyObject * obj1 = 0 ;
15099 PyObject * obj2 = 0 ;
15100 PyObject * obj3 = 0 ;
15101 PyObject * obj4 = 0 ;
15102 PyObject * obj5 = 0 ;
15104 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:knn_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
15105 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15106 if (!SWIG_IsOK(res1)) {
15107 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "knn_inner_product" "', argument " "1"" of type '" "float const *""'");
15109 arg1 =
reinterpret_cast< float *
>(argp1);
15110 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15111 if (!SWIG_IsOK(res2)) {
15112 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "knn_inner_product" "', argument " "2"" of type '" "float const *""'");
15114 arg2 =
reinterpret_cast< float *
>(argp2);
15115 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15116 if (!SWIG_IsOK(ecode3)) {
15117 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "knn_inner_product" "', argument " "3"" of type '" "size_t""'");
15119 arg3 =
static_cast< size_t >(val3);
15120 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15121 if (!SWIG_IsOK(ecode4)) {
15122 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "knn_inner_product" "', argument " "4"" of type '" "size_t""'");
15124 arg4 =
static_cast< size_t >(val4);
15125 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15126 if (!SWIG_IsOK(ecode5)) {
15127 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "knn_inner_product" "', argument " "5"" of type '" "size_t""'");
15129 arg5 =
static_cast< size_t >(val5);
15130 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
15131 if (!SWIG_IsOK(res6)) {
15132 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "knn_inner_product" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
15136 Py_BEGIN_ALLOW_THREADS
15140 PyEval_RestoreThread(_save);
15142 if (PyErr_Occurred()) {
15145 PyErr_SetString(PyExc_RuntimeError, e.
what());
15149 Py_END_ALLOW_THREADS
15151 resultobj = SWIG_Py_Void();
15158 SWIGINTERN PyObject *_wrap_knn_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15159 PyObject *resultobj = 0;
15160 float *arg1 = (
float *) 0 ;
15161 float *arg2 = (
float *) 0 ;
15178 PyObject * obj0 = 0 ;
15179 PyObject * obj1 = 0 ;
15180 PyObject * obj2 = 0 ;
15181 PyObject * obj3 = 0 ;
15182 PyObject * obj4 = 0 ;
15183 PyObject * obj5 = 0 ;
15185 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:knn_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
15186 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15187 if (!SWIG_IsOK(res1)) {
15188 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "knn_L2sqr" "', argument " "1"" of type '" "float const *""'");
15190 arg1 =
reinterpret_cast< float *
>(argp1);
15191 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15192 if (!SWIG_IsOK(res2)) {
15193 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "knn_L2sqr" "', argument " "2"" of type '" "float const *""'");
15195 arg2 =
reinterpret_cast< float *
>(argp2);
15196 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15197 if (!SWIG_IsOK(ecode3)) {
15198 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "knn_L2sqr" "', argument " "3"" of type '" "size_t""'");
15200 arg3 =
static_cast< size_t >(val3);
15201 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15202 if (!SWIG_IsOK(ecode4)) {
15203 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "knn_L2sqr" "', argument " "4"" of type '" "size_t""'");
15205 arg4 =
static_cast< size_t >(val4);
15206 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15207 if (!SWIG_IsOK(ecode5)) {
15208 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "knn_L2sqr" "', argument " "5"" of type '" "size_t""'");
15210 arg5 =
static_cast< size_t >(val5);
15211 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
15212 if (!SWIG_IsOK(res6)) {
15213 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "knn_L2sqr" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
15217 Py_BEGIN_ALLOW_THREADS
15219 faiss::knn_L2sqr((
float const *)arg1,(
float const *)arg2,arg3,arg4,arg5,arg6);
15221 PyEval_RestoreThread(_save);
15223 if (PyErr_Occurred()) {
15226 PyErr_SetString(PyExc_RuntimeError, e.
what());
15230 Py_END_ALLOW_THREADS
15232 resultobj = SWIG_Py_Void();
15239 SWIGINTERN PyObject *_wrap_knn_L2sqr_base_shift(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15240 PyObject *resultobj = 0;
15241 float *arg1 = (
float *) 0 ;
15242 float *arg2 = (
float *) 0 ;
15247 float *arg7 = (
float *) 0 ;
15262 PyObject * obj0 = 0 ;
15263 PyObject * obj1 = 0 ;
15264 PyObject * obj2 = 0 ;
15265 PyObject * obj3 = 0 ;
15266 PyObject * obj4 = 0 ;
15267 PyObject * obj5 = 0 ;
15268 PyObject * obj6 = 0 ;
15270 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:knn_L2sqr_base_shift",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15271 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15272 if (!SWIG_IsOK(res1)) {
15273 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "knn_L2sqr_base_shift" "', argument " "1"" of type '" "float const *""'");
15275 arg1 =
reinterpret_cast< float *
>(argp1);
15276 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15277 if (!SWIG_IsOK(res2)) {
15278 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "knn_L2sqr_base_shift" "', argument " "2"" of type '" "float const *""'");
15280 arg2 =
reinterpret_cast< float *
>(argp2);
15281 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15282 if (!SWIG_IsOK(ecode3)) {
15283 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "knn_L2sqr_base_shift" "', argument " "3"" of type '" "size_t""'");
15285 arg3 =
static_cast< size_t >(val3);
15286 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15287 if (!SWIG_IsOK(ecode4)) {
15288 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "knn_L2sqr_base_shift" "', argument " "4"" of type '" "size_t""'");
15290 arg4 =
static_cast< size_t >(val4);
15291 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15292 if (!SWIG_IsOK(ecode5)) {
15293 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "knn_L2sqr_base_shift" "', argument " "5"" of type '" "size_t""'");
15295 arg5 =
static_cast< size_t >(val5);
15296 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
15297 if (!SWIG_IsOK(res6)) {
15298 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "knn_L2sqr_base_shift" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
15301 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
15302 if (!SWIG_IsOK(res7)) {
15303 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "knn_L2sqr_base_shift" "', argument " "7"" of type '" "float const *""'");
15305 arg7 =
reinterpret_cast< float *
>(argp7);
15307 Py_BEGIN_ALLOW_THREADS
15311 PyEval_RestoreThread(_save);
15313 if (PyErr_Occurred()) {
15316 PyErr_SetString(PyExc_RuntimeError, e.
what());
15320 Py_END_ALLOW_THREADS
15322 resultobj = SWIG_Py_Void();
15329 SWIGINTERN PyObject *_wrap_knn_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15330 PyObject *resultobj = 0;
15331 float *arg1 = (
float *) 0 ;
15332 float *arg2 = (
float *) 0 ;
15333 long *arg3 = (
long *) 0 ;
15352 PyObject * obj0 = 0 ;
15353 PyObject * obj1 = 0 ;
15354 PyObject * obj2 = 0 ;
15355 PyObject * obj3 = 0 ;
15356 PyObject * obj4 = 0 ;
15357 PyObject * obj5 = 0 ;
15358 PyObject * obj6 = 0 ;
15360 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:knn_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15361 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15362 if (!SWIG_IsOK(res1)) {
15363 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "knn_inner_products_by_idx" "', argument " "1"" of type '" "float const *""'");
15365 arg1 =
reinterpret_cast< float *
>(argp1);
15366 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15367 if (!SWIG_IsOK(res2)) {
15368 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "knn_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
15370 arg2 =
reinterpret_cast< float *
>(argp2);
15371 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15372 if (!SWIG_IsOK(res3)) {
15373 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "knn_inner_products_by_idx" "', argument " "3"" of type '" "long const *""'");
15375 arg3 =
reinterpret_cast< long *
>(argp3);
15376 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15377 if (!SWIG_IsOK(ecode4)) {
15378 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "knn_inner_products_by_idx" "', argument " "4"" of type '" "size_t""'");
15380 arg4 =
static_cast< size_t >(val4);
15381 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15382 if (!SWIG_IsOK(ecode5)) {
15383 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "knn_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
15385 arg5 =
static_cast< size_t >(val5);
15386 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15387 if (!SWIG_IsOK(ecode6)) {
15388 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "knn_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
15390 arg6 =
static_cast< size_t >(val6);
15391 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
15392 if (!SWIG_IsOK(res7)) {
15393 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "knn_inner_products_by_idx" "', argument " "7"" of type '" "faiss::float_minheap_array_t *""'");
15397 Py_BEGIN_ALLOW_THREADS
15399 faiss::knn_inner_products_by_idx((
float const *)arg1,(
float const *)arg2,(
long const *)arg3,arg4,arg5,arg6,arg7);
15401 PyEval_RestoreThread(_save);
15403 if (PyErr_Occurred()) {
15406 PyErr_SetString(PyExc_RuntimeError, e.
what());
15410 Py_END_ALLOW_THREADS
15412 resultobj = SWIG_Py_Void();
15419 SWIGINTERN PyObject *_wrap_knn_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15420 PyObject *resultobj = 0;
15421 float *arg1 = (
float *) 0 ;
15422 float *arg2 = (
float *) 0 ;
15423 long *arg3 = (
long *) 0 ;
15442 PyObject * obj0 = 0 ;
15443 PyObject * obj1 = 0 ;
15444 PyObject * obj2 = 0 ;
15445 PyObject * obj3 = 0 ;
15446 PyObject * obj4 = 0 ;
15447 PyObject * obj5 = 0 ;
15448 PyObject * obj6 = 0 ;
15450 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:knn_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15451 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15452 if (!SWIG_IsOK(res1)) {
15453 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "knn_L2sqr_by_idx" "', argument " "1"" of type '" "float const *""'");
15455 arg1 =
reinterpret_cast< float *
>(argp1);
15456 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15457 if (!SWIG_IsOK(res2)) {
15458 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "knn_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
15460 arg2 =
reinterpret_cast< float *
>(argp2);
15461 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15462 if (!SWIG_IsOK(res3)) {
15463 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "knn_L2sqr_by_idx" "', argument " "3"" of type '" "long const *""'");
15465 arg3 =
reinterpret_cast< long *
>(argp3);
15466 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15467 if (!SWIG_IsOK(ecode4)) {
15468 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "knn_L2sqr_by_idx" "', argument " "4"" of type '" "size_t""'");
15470 arg4 =
static_cast< size_t >(val4);
15471 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15472 if (!SWIG_IsOK(ecode5)) {
15473 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "knn_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
15475 arg5 =
static_cast< size_t >(val5);
15476 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15477 if (!SWIG_IsOK(ecode6)) {
15478 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "knn_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
15480 arg6 =
static_cast< size_t >(val6);
15481 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
15482 if (!SWIG_IsOK(res7)) {
15483 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "knn_L2sqr_by_idx" "', argument " "7"" of type '" "faiss::float_maxheap_array_t *""'");
15487 Py_BEGIN_ALLOW_THREADS
15489 faiss::knn_L2sqr_by_idx((
float const *)arg1,(
float const *)arg2,(
long const *)arg3,arg4,arg5,arg6,arg7);
15491 PyEval_RestoreThread(_save);
15493 if (PyErr_Occurred()) {
15496 PyErr_SetString(PyExc_RuntimeError, e.
what());
15500 Py_END_ALLOW_THREADS
15502 resultobj = SWIG_Py_Void();
15509 SWIGINTERN PyObject *_wrap_range_search_L2sqr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15510 PyObject *resultobj = 0;
15511 float *arg1 = (
float *) 0 ;
15512 float *arg2 = (
float *) 0 ;
15532 PyObject * obj0 = 0 ;
15533 PyObject * obj1 = 0 ;
15534 PyObject * obj2 = 0 ;
15535 PyObject * obj3 = 0 ;
15536 PyObject * obj4 = 0 ;
15537 PyObject * obj5 = 0 ;
15538 PyObject * obj6 = 0 ;
15540 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:range_search_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15541 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15542 if (!SWIG_IsOK(res1)) {
15543 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "range_search_L2sqr" "', argument " "1"" of type '" "float const *""'");
15545 arg1 =
reinterpret_cast< float *
>(argp1);
15546 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15547 if (!SWIG_IsOK(res2)) {
15548 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "range_search_L2sqr" "', argument " "2"" of type '" "float const *""'");
15550 arg2 =
reinterpret_cast< float *
>(argp2);
15551 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15552 if (!SWIG_IsOK(ecode3)) {
15553 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "range_search_L2sqr" "', argument " "3"" of type '" "size_t""'");
15555 arg3 =
static_cast< size_t >(val3);
15556 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15557 if (!SWIG_IsOK(ecode4)) {
15558 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "range_search_L2sqr" "', argument " "4"" of type '" "size_t""'");
15560 arg4 =
static_cast< size_t >(val4);
15561 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15562 if (!SWIG_IsOK(ecode5)) {
15563 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "range_search_L2sqr" "', argument " "5"" of type '" "size_t""'");
15565 arg5 =
static_cast< size_t >(val5);
15566 ecode6 = SWIG_AsVal_float(obj5, &val6);
15567 if (!SWIG_IsOK(ecode6)) {
15568 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "range_search_L2sqr" "', argument " "6"" of type '" "float""'");
15570 arg6 =
static_cast< float >(val6);
15571 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
15572 if (!SWIG_IsOK(res7)) {
15573 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "range_search_L2sqr" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
15577 Py_BEGIN_ALLOW_THREADS
15581 PyEval_RestoreThread(_save);
15583 if (PyErr_Occurred()) {
15586 PyErr_SetString(PyExc_RuntimeError, e.
what());
15590 Py_END_ALLOW_THREADS
15592 resultobj = SWIG_Py_Void();
15599 SWIGINTERN PyObject *_wrap_range_search_inner_product(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15600 PyObject *resultobj = 0;
15601 float *arg1 = (
float *) 0 ;
15602 float *arg2 = (
float *) 0 ;
15622 PyObject * obj0 = 0 ;
15623 PyObject * obj1 = 0 ;
15624 PyObject * obj2 = 0 ;
15625 PyObject * obj3 = 0 ;
15626 PyObject * obj4 = 0 ;
15627 PyObject * obj5 = 0 ;
15628 PyObject * obj6 = 0 ;
15630 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:range_search_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15631 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15632 if (!SWIG_IsOK(res1)) {
15633 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "range_search_inner_product" "', argument " "1"" of type '" "float const *""'");
15635 arg1 =
reinterpret_cast< float *
>(argp1);
15636 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15637 if (!SWIG_IsOK(res2)) {
15638 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "range_search_inner_product" "', argument " "2"" of type '" "float const *""'");
15640 arg2 =
reinterpret_cast< float *
>(argp2);
15641 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15642 if (!SWIG_IsOK(ecode3)) {
15643 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "range_search_inner_product" "', argument " "3"" of type '" "size_t""'");
15645 arg3 =
static_cast< size_t >(val3);
15646 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15647 if (!SWIG_IsOK(ecode4)) {
15648 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "range_search_inner_product" "', argument " "4"" of type '" "size_t""'");
15650 arg4 =
static_cast< size_t >(val4);
15651 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15652 if (!SWIG_IsOK(ecode5)) {
15653 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "range_search_inner_product" "', argument " "5"" of type '" "size_t""'");
15655 arg5 =
static_cast< size_t >(val5);
15656 ecode6 = SWIG_AsVal_float(obj5, &val6);
15657 if (!SWIG_IsOK(ecode6)) {
15658 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "range_search_inner_product" "', argument " "6"" of type '" "float""'");
15660 arg6 =
static_cast< float >(val6);
15661 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
15662 if (!SWIG_IsOK(res7)) {
15663 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "range_search_inner_product" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
15667 Py_BEGIN_ALLOW_THREADS
15671 PyEval_RestoreThread(_save);
15673 if (PyErr_Occurred()) {
15676 PyErr_SetString(PyExc_RuntimeError, e.
what());
15680 Py_END_ALLOW_THREADS
15682 resultobj = SWIG_Py_Void();
15689 SWIGINTERN PyObject *_wrap_fvec_madd(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15690 PyObject *resultobj = 0;
15692 float *arg2 = (
float *) 0 ;
15694 float *arg4 = (
float *) 0 ;
15695 float *arg5 = (
float *) 0 ;
15706 PyObject * obj0 = 0 ;
15707 PyObject * obj1 = 0 ;
15708 PyObject * obj2 = 0 ;
15709 PyObject * obj3 = 0 ;
15710 PyObject * obj4 = 0 ;
15712 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:fvec_madd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15713 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15714 if (!SWIG_IsOK(ecode1)) {
15715 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvec_madd" "', argument " "1"" of type '" "size_t""'");
15717 arg1 =
static_cast< size_t >(val1);
15718 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15719 if (!SWIG_IsOK(res2)) {
15720 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_madd" "', argument " "2"" of type '" "float const *""'");
15722 arg2 =
reinterpret_cast< float *
>(argp2);
15723 ecode3 = SWIG_AsVal_float(obj2, &val3);
15724 if (!SWIG_IsOK(ecode3)) {
15725 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_madd" "', argument " "3"" of type '" "float""'");
15727 arg3 =
static_cast< float >(val3);
15728 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15729 if (!SWIG_IsOK(res4)) {
15730 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvec_madd" "', argument " "4"" of type '" "float const *""'");
15732 arg4 =
reinterpret_cast< float *
>(argp4);
15733 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15734 if (!SWIG_IsOK(res5)) {
15735 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "fvec_madd" "', argument " "5"" of type '" "float *""'");
15737 arg5 =
reinterpret_cast< float *
>(argp5);
15739 Py_BEGIN_ALLOW_THREADS
15743 PyEval_RestoreThread(_save);
15745 if (PyErr_Occurred()) {
15748 PyErr_SetString(PyExc_RuntimeError, e.
what());
15752 Py_END_ALLOW_THREADS
15754 resultobj = SWIG_Py_Void();
15761 SWIGINTERN PyObject *_wrap_fvec_madd_and_argmin(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15762 PyObject *resultobj = 0;
15764 float *arg2 = (
float *) 0 ;
15766 float *arg4 = (
float *) 0 ;
15767 float *arg5 = (
float *) 0 ;
15778 PyObject * obj0 = 0 ;
15779 PyObject * obj1 = 0 ;
15780 PyObject * obj2 = 0 ;
15781 PyObject * obj3 = 0 ;
15782 PyObject * obj4 = 0 ;
15785 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:fvec_madd_and_argmin",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15786 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15787 if (!SWIG_IsOK(ecode1)) {
15788 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvec_madd_and_argmin" "', argument " "1"" of type '" "size_t""'");
15790 arg1 =
static_cast< size_t >(val1);
15791 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15792 if (!SWIG_IsOK(res2)) {
15793 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_madd_and_argmin" "', argument " "2"" of type '" "float const *""'");
15795 arg2 =
reinterpret_cast< float *
>(argp2);
15796 ecode3 = SWIG_AsVal_float(obj2, &val3);
15797 if (!SWIG_IsOK(ecode3)) {
15798 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvec_madd_and_argmin" "', argument " "3"" of type '" "float""'");
15800 arg3 =
static_cast< float >(val3);
15801 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15802 if (!SWIG_IsOK(res4)) {
15803 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvec_madd_and_argmin" "', argument " "4"" of type '" "float const *""'");
15805 arg4 =
reinterpret_cast< float *
>(argp4);
15806 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15807 if (!SWIG_IsOK(res5)) {
15808 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "fvec_madd_and_argmin" "', argument " "5"" of type '" "float *""'");
15810 arg5 =
reinterpret_cast< float *
>(argp5);
15812 Py_BEGIN_ALLOW_THREADS
15816 PyEval_RestoreThread(_save);
15818 if (PyErr_Occurred()) {
15821 PyErr_SetString(PyExc_RuntimeError, e.
what());
15825 Py_END_ALLOW_THREADS
15827 resultobj = SWIG_From_int(static_cast< int >(result));
15834 SWIGINTERN PyObject *_wrap_reflection(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15835 PyObject *resultobj = 0;
15836 float *arg1 = (
float *) 0 ;
15837 float *arg2 = (
float *) 0 ;
15851 PyObject * obj0 = 0 ;
15852 PyObject * obj1 = 0 ;
15853 PyObject * obj2 = 0 ;
15854 PyObject * obj3 = 0 ;
15855 PyObject * obj4 = 0 ;
15857 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:reflection",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15858 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15859 if (!SWIG_IsOK(res1)) {
15860 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "reflection" "', argument " "1"" of type '" "float const *""'");
15862 arg1 =
reinterpret_cast< float *
>(argp1);
15863 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15864 if (!SWIG_IsOK(res2)) {
15865 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "reflection" "', argument " "2"" of type '" "float *""'");
15867 arg2 =
reinterpret_cast< float *
>(argp2);
15868 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15869 if (!SWIG_IsOK(ecode3)) {
15870 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "reflection" "', argument " "3"" of type '" "size_t""'");
15872 arg3 =
static_cast< size_t >(val3);
15873 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15874 if (!SWIG_IsOK(ecode4)) {
15875 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "reflection" "', argument " "4"" of type '" "size_t""'");
15877 arg4 =
static_cast< size_t >(val4);
15878 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15879 if (!SWIG_IsOK(ecode5)) {
15880 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "reflection" "', argument " "5"" of type '" "size_t""'");
15882 arg5 =
static_cast< size_t >(val5);
15884 Py_BEGIN_ALLOW_THREADS
15886 faiss::reflection((
float const *)arg1,arg2,arg3,arg4,arg5);
15888 PyEval_RestoreThread(_save);
15890 if (PyErr_Occurred()) {
15893 PyErr_SetString(PyExc_RuntimeError, e.
what());
15897 Py_END_ALLOW_THREADS
15899 resultobj = SWIG_Py_Void();
15906 SWIGINTERN PyObject *_wrap_km_update_centroids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15907 PyObject *resultobj = 0;
15908 float *arg1 = (
float *) 0 ;
15909 float *arg2 = (
float *) 0 ;
15910 long *arg3 = (
long *) 0 ;
15929 PyObject * obj0 = 0 ;
15930 PyObject * obj1 = 0 ;
15931 PyObject * obj2 = 0 ;
15932 PyObject * obj3 = 0 ;
15933 PyObject * obj4 = 0 ;
15934 PyObject * obj5 = 0 ;
15935 PyObject * obj6 = 0 ;
15938 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:km_update_centroids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15939 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15940 if (!SWIG_IsOK(res1)) {
15941 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "km_update_centroids" "', argument " "1"" of type '" "float const *""'");
15943 arg1 =
reinterpret_cast< float *
>(argp1);
15944 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15945 if (!SWIG_IsOK(res2)) {
15946 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "km_update_centroids" "', argument " "2"" of type '" "float *""'");
15948 arg2 =
reinterpret_cast< float *
>(argp2);
15949 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15950 if (!SWIG_IsOK(res3)) {
15951 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "km_update_centroids" "', argument " "3"" of type '" "long *""'");
15953 arg3 =
reinterpret_cast< long *
>(argp3);
15954 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15955 if (!SWIG_IsOK(ecode4)) {
15956 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "km_update_centroids" "', argument " "4"" of type '" "size_t""'");
15958 arg4 =
static_cast< size_t >(val4);
15959 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15960 if (!SWIG_IsOK(ecode5)) {
15961 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "km_update_centroids" "', argument " "5"" of type '" "size_t""'");
15963 arg5 =
static_cast< size_t >(val5);
15964 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15965 if (!SWIG_IsOK(ecode6)) {
15966 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "km_update_centroids" "', argument " "6"" of type '" "size_t""'");
15968 arg6 =
static_cast< size_t >(val6);
15969 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
15970 if (!SWIG_IsOK(ecode7)) {
15971 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "km_update_centroids" "', argument " "7"" of type '" "size_t""'");
15973 arg7 =
static_cast< size_t >(val7);
15975 Py_BEGIN_ALLOW_THREADS
15979 PyEval_RestoreThread(_save);
15981 if (PyErr_Occurred()) {
15984 PyErr_SetString(PyExc_RuntimeError, e.
what());
15988 Py_END_ALLOW_THREADS
15990 resultobj = SWIG_From_int(static_cast< int >(result));
15997 SWIGINTERN PyObject *_wrap_matrix_qr(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
15998 PyObject *resultobj = 0;
16001 float *arg3 = (
float *) 0 ;
16008 PyObject * obj0 = 0 ;
16009 PyObject * obj1 = 0 ;
16010 PyObject * obj2 = 0 ;
16012 if (!PyArg_ParseTuple(args,(
char *)
"OOO:matrix_qr",&obj0,&obj1,&obj2)) SWIG_fail;
16013 ecode1 = SWIG_AsVal_int(obj0, &val1);
16014 if (!SWIG_IsOK(ecode1)) {
16015 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "matrix_qr" "', argument " "1"" of type '" "int""'");
16017 arg1 =
static_cast< int >(val1);
16018 ecode2 = SWIG_AsVal_int(obj1, &val2);
16019 if (!SWIG_IsOK(ecode2)) {
16020 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "matrix_qr" "', argument " "2"" of type '" "int""'");
16022 arg2 =
static_cast< int >(val2);
16023 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
16024 if (!SWIG_IsOK(res3)) {
16025 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "matrix_qr" "', argument " "3"" of type '" "float *""'");
16027 arg3 =
reinterpret_cast< float *
>(argp3);
16029 Py_BEGIN_ALLOW_THREADS
16033 PyEval_RestoreThread(_save);
16035 if (PyErr_Occurred()) {
16038 PyErr_SetString(PyExc_RuntimeError, e.
what());
16042 Py_END_ALLOW_THREADS
16044 resultobj = SWIG_Py_Void();
16051 SWIGINTERN PyObject *_wrap_ranklist_handle_ties(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16052 PyObject *resultobj = 0;
16054 long *arg2 = (
long *) 0 ;
16055 float *arg3 = (
float *) 0 ;
16062 PyObject * obj0 = 0 ;
16063 PyObject * obj1 = 0 ;
16064 PyObject * obj2 = 0 ;
16066 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ranklist_handle_ties",&obj0,&obj1,&obj2)) SWIG_fail;
16067 ecode1 = SWIG_AsVal_int(obj0, &val1);
16068 if (!SWIG_IsOK(ecode1)) {
16069 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "ranklist_handle_ties" "', argument " "1"" of type '" "int""'");
16071 arg1 =
static_cast< int >(val1);
16072 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
16073 if (!SWIG_IsOK(res2)) {
16074 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ranklist_handle_ties" "', argument " "2"" of type '" "long *""'");
16076 arg2 =
reinterpret_cast< long *
>(argp2);
16077 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
16078 if (!SWIG_IsOK(res3)) {
16079 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ranklist_handle_ties" "', argument " "3"" of type '" "float const *""'");
16081 arg3 =
reinterpret_cast< float *
>(argp3);
16083 Py_BEGIN_ALLOW_THREADS
16087 PyEval_RestoreThread(_save);
16089 if (PyErr_Occurred()) {
16092 PyErr_SetString(PyExc_RuntimeError, e.
what());
16096 Py_END_ALLOW_THREADS
16098 resultobj = SWIG_Py_Void();
16105 SWIGINTERN PyObject *_wrap_ranklist_intersection_size(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16106 PyObject *resultobj = 0;
16108 long *arg2 = (
long *) 0 ;
16110 long *arg4 = (
long *) 0 ;
16119 PyObject * obj0 = 0 ;
16120 PyObject * obj1 = 0 ;
16121 PyObject * obj2 = 0 ;
16122 PyObject * obj3 = 0 ;
16125 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ranklist_intersection_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16126 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16127 if (!SWIG_IsOK(ecode1)) {
16128 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "ranklist_intersection_size" "', argument " "1"" of type '" "size_t""'");
16130 arg1 =
static_cast< size_t >(val1);
16131 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
16132 if (!SWIG_IsOK(res2)) {
16133 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ranklist_intersection_size" "', argument " "2"" of type '" "long const *""'");
16135 arg2 =
reinterpret_cast< long *
>(argp2);
16136 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16137 if (!SWIG_IsOK(ecode3)) {
16138 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ranklist_intersection_size" "', argument " "3"" of type '" "size_t""'");
16140 arg3 =
static_cast< size_t >(val3);
16141 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
16142 if (!SWIG_IsOK(res4)) {
16143 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ranklist_intersection_size" "', argument " "4"" of type '" "long const *""'");
16145 arg4 =
reinterpret_cast< long *
>(argp4);
16147 Py_BEGIN_ALLOW_THREADS
16151 PyEval_RestoreThread(_save);
16153 if (PyErr_Occurred()) {
16156 PyErr_SetString(PyExc_RuntimeError, e.
what());
16160 Py_END_ALLOW_THREADS
16162 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16169 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16170 PyObject *resultobj = 0;
16173 long *arg3 = (
long *) 0 ;
16174 float *arg4 = (
float *) 0 ;
16175 long *arg5 = (
long *) 0 ;
16176 float *arg6 = (
float *) 0 ;
16195 PyObject * obj0 = 0 ;
16196 PyObject * obj1 = 0 ;
16197 PyObject * obj2 = 0 ;
16198 PyObject * obj3 = 0 ;
16199 PyObject * obj4 = 0 ;
16200 PyObject * obj5 = 0 ;
16201 PyObject * obj6 = 0 ;
16202 PyObject * obj7 = 0 ;
16205 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
16206 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16207 if (!SWIG_IsOK(ecode1)) {
16208 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
16210 arg1 =
static_cast< size_t >(val1);
16211 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16212 if (!SWIG_IsOK(ecode2)) {
16213 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
16215 arg2 =
static_cast< size_t >(val2);
16216 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16217 if (!SWIG_IsOK(res3)) {
16218 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
16220 arg3 =
reinterpret_cast< long *
>(argp3);
16221 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16222 if (!SWIG_IsOK(res4)) {
16223 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
16225 arg4 =
reinterpret_cast< float *
>(argp4);
16226 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
16227 if (!SWIG_IsOK(res5)) {
16228 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
16230 arg5 =
reinterpret_cast< long *
>(argp5);
16231 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
16232 if (!SWIG_IsOK(res6)) {
16233 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
16235 arg6 =
reinterpret_cast< float *
>(argp6);
16236 ecode7 = SWIG_AsVal_bool(obj6, &val7);
16237 if (!SWIG_IsOK(ecode7)) {
16238 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
16240 arg7 =
static_cast< bool >(val7);
16241 ecode8 = SWIG_AsVal_long(obj7, &val8);
16242 if (!SWIG_IsOK(ecode8)) {
16243 SWIG_exception_fail(SWIG_ArgError(ecode8),
"in method '" "merge_result_table_with" "', argument " "8"" of type '" "long""'");
16245 arg8 =
static_cast< long >(val8);
16247 Py_BEGIN_ALLOW_THREADS
16251 PyEval_RestoreThread(_save);
16253 if (PyErr_Occurred()) {
16256 PyErr_SetString(PyExc_RuntimeError, e.
what());
16260 Py_END_ALLOW_THREADS
16262 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16269 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16270 PyObject *resultobj = 0;
16273 long *arg3 = (
long *) 0 ;
16274 float *arg4 = (
float *) 0 ;
16275 long *arg5 = (
long *) 0 ;
16276 float *arg6 = (
float *) 0 ;
16292 PyObject * obj0 = 0 ;
16293 PyObject * obj1 = 0 ;
16294 PyObject * obj2 = 0 ;
16295 PyObject * obj3 = 0 ;
16296 PyObject * obj4 = 0 ;
16297 PyObject * obj5 = 0 ;
16298 PyObject * obj6 = 0 ;
16301 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16302 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16303 if (!SWIG_IsOK(ecode1)) {
16304 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
16306 arg1 =
static_cast< size_t >(val1);
16307 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16308 if (!SWIG_IsOK(ecode2)) {
16309 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
16311 arg2 =
static_cast< size_t >(val2);
16312 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16313 if (!SWIG_IsOK(res3)) {
16314 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
16316 arg3 =
reinterpret_cast< long *
>(argp3);
16317 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16318 if (!SWIG_IsOK(res4)) {
16319 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
16321 arg4 =
reinterpret_cast< float *
>(argp4);
16322 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
16323 if (!SWIG_IsOK(res5)) {
16324 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
16326 arg5 =
reinterpret_cast< long *
>(argp5);
16327 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
16328 if (!SWIG_IsOK(res6)) {
16329 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
16331 arg6 =
reinterpret_cast< float *
>(argp6);
16332 ecode7 = SWIG_AsVal_bool(obj6, &val7);
16333 if (!SWIG_IsOK(ecode7)) {
16334 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
16336 arg7 =
static_cast< bool >(val7);
16338 Py_BEGIN_ALLOW_THREADS
16342 PyEval_RestoreThread(_save);
16344 if (PyErr_Occurred()) {
16347 PyErr_SetString(PyExc_RuntimeError, e.
what());
16351 Py_END_ALLOW_THREADS
16353 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16360 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16361 PyObject *resultobj = 0;
16364 long *arg3 = (
long *) 0 ;
16365 float *arg4 = (
float *) 0 ;
16366 long *arg5 = (
long *) 0 ;
16367 float *arg6 = (
float *) 0 ;
16380 PyObject * obj0 = 0 ;
16381 PyObject * obj1 = 0 ;
16382 PyObject * obj2 = 0 ;
16383 PyObject * obj3 = 0 ;
16384 PyObject * obj4 = 0 ;
16385 PyObject * obj5 = 0 ;
16388 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
16389 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16390 if (!SWIG_IsOK(ecode1)) {
16391 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
16393 arg1 =
static_cast< size_t >(val1);
16394 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16395 if (!SWIG_IsOK(ecode2)) {
16396 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
16398 arg2 =
static_cast< size_t >(val2);
16399 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16400 if (!SWIG_IsOK(res3)) {
16401 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
16403 arg3 =
reinterpret_cast< long *
>(argp3);
16404 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16405 if (!SWIG_IsOK(res4)) {
16406 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
16408 arg4 =
reinterpret_cast< float *
>(argp4);
16409 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
16410 if (!SWIG_IsOK(res5)) {
16411 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
16413 arg5 =
reinterpret_cast< long *
>(argp5);
16414 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
16415 if (!SWIG_IsOK(res6)) {
16416 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
16418 arg6 =
reinterpret_cast< float *
>(argp6);
16420 Py_BEGIN_ALLOW_THREADS
16424 PyEval_RestoreThread(_save);
16426 if (PyErr_Occurred()) {
16429 PyErr_SetString(PyExc_RuntimeError, e.
what());
16433 Py_END_ALLOW_THREADS
16435 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16442 SWIGINTERN PyObject *_wrap_merge_result_table_with(PyObject *
self, PyObject *args) {
16444 PyObject *argv[9] = {
16449 if (!PyTuple_Check(args)) SWIG_fail;
16450 argc = args ? PyObject_Length(args) : 0;
16451 for (ii = 0; (ii < 8) && (ii < argc); ii++) {
16452 argv[ii] = PyTuple_GET_ITEM(args,ii);
16457 int res = SWIG_AsVal_size_t(argv[0], NULL);
16458 _v = SWIG_CheckState(res);
16462 int res = SWIG_AsVal_size_t(argv[1], NULL);
16463 _v = SWIG_CheckState(res);
16467 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
16468 _v = SWIG_CheckState(res);
16471 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16472 _v = SWIG_CheckState(res);
16475 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
16476 _v = SWIG_CheckState(res);
16479 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
16480 _v = SWIG_CheckState(res);
16482 return _wrap_merge_result_table_with__SWIG_2(
self, args);
16493 int res = SWIG_AsVal_size_t(argv[0], NULL);
16494 _v = SWIG_CheckState(res);
16498 int res = SWIG_AsVal_size_t(argv[1], NULL);
16499 _v = SWIG_CheckState(res);
16503 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
16504 _v = SWIG_CheckState(res);
16507 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16508 _v = SWIG_CheckState(res);
16511 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
16512 _v = SWIG_CheckState(res);
16515 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
16516 _v = SWIG_CheckState(res);
16519 int res = SWIG_AsVal_bool(argv[6], NULL);
16520 _v = SWIG_CheckState(res);
16523 return _wrap_merge_result_table_with__SWIG_1(
self, args);
16535 int res = SWIG_AsVal_size_t(argv[0], NULL);
16536 _v = SWIG_CheckState(res);
16540 int res = SWIG_AsVal_size_t(argv[1], NULL);
16541 _v = SWIG_CheckState(res);
16545 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
16546 _v = SWIG_CheckState(res);
16549 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16550 _v = SWIG_CheckState(res);
16553 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
16554 _v = SWIG_CheckState(res);
16557 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
16558 _v = SWIG_CheckState(res);
16561 int res = SWIG_AsVal_bool(argv[6], NULL);
16562 _v = SWIG_CheckState(res);
16566 int res = SWIG_AsVal_long(argv[7], NULL);
16567 _v = SWIG_CheckState(res);
16570 return _wrap_merge_result_table_with__SWIG_0(
self, args);
16582 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'merge_result_table_with'.\n"
16583 " Possible C/C++ prototypes are:\n"
16584 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool,long)\n"
16585 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool)\n"
16586 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *)\n");
16591 SWIGINTERN PyObject *_wrap_fvec_argsort(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16592 PyObject *resultobj = 0;
16594 float *arg2 = (
float *) 0 ;
16595 size_t *arg3 = (
size_t *) 0 ;
16602 PyObject * obj0 = 0 ;
16603 PyObject * obj1 = 0 ;
16604 PyObject * obj2 = 0 ;
16606 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec_argsort",&obj0,&obj1,&obj2)) SWIG_fail;
16607 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16608 if (!SWIG_IsOK(ecode1)) {
16609 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvec_argsort" "', argument " "1"" of type '" "size_t""'");
16611 arg1 =
static_cast< size_t >(val1);
16612 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16613 if (!SWIG_IsOK(res2)) {
16614 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_argsort" "', argument " "2"" of type '" "float const *""'");
16616 arg2 =
reinterpret_cast< float *
>(argp2);
16617 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
16618 if (!SWIG_IsOK(res3)) {
16619 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_argsort" "', argument " "3"" of type '" "size_t *""'");
16621 arg3 =
reinterpret_cast< size_t *
>(argp3);
16623 Py_BEGIN_ALLOW_THREADS
16625 faiss::fvec_argsort(arg1,(
float const *)arg2,arg3);
16627 PyEval_RestoreThread(_save);
16629 if (PyErr_Occurred()) {
16632 PyErr_SetString(PyExc_RuntimeError, e.
what());
16636 Py_END_ALLOW_THREADS
16638 resultobj = SWIG_Py_Void();
16645 SWIGINTERN PyObject *_wrap_fvec_argsort_parallel(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16646 PyObject *resultobj = 0;
16648 float *arg2 = (
float *) 0 ;
16649 size_t *arg3 = (
size_t *) 0 ;
16656 PyObject * obj0 = 0 ;
16657 PyObject * obj1 = 0 ;
16658 PyObject * obj2 = 0 ;
16660 if (!PyArg_ParseTuple(args,(
char *)
"OOO:fvec_argsort_parallel",&obj0,&obj1,&obj2)) SWIG_fail;
16661 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16662 if (!SWIG_IsOK(ecode1)) {
16663 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvec_argsort_parallel" "', argument " "1"" of type '" "size_t""'");
16665 arg1 =
static_cast< size_t >(val1);
16666 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16667 if (!SWIG_IsOK(res2)) {
16668 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvec_argsort_parallel" "', argument " "2"" of type '" "float const *""'");
16670 arg2 =
reinterpret_cast< float *
>(argp2);
16671 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
16672 if (!SWIG_IsOK(res3)) {
16673 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "fvec_argsort_parallel" "', argument " "3"" of type '" "size_t *""'");
16675 arg3 =
reinterpret_cast< size_t *
>(argp3);
16677 Py_BEGIN_ALLOW_THREADS
16679 faiss::fvec_argsort_parallel(arg1,(
float const *)arg2,arg3);
16681 PyEval_RestoreThread(_save);
16683 if (PyErr_Occurred()) {
16686 PyErr_SetString(PyExc_RuntimeError, e.
what());
16690 Py_END_ALLOW_THREADS
16692 resultobj = SWIG_Py_Void();
16699 SWIGINTERN PyObject *_wrap_ivec_hist(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16700 PyObject *resultobj = 0;
16702 int *arg2 = (
int *) 0 ;
16704 int *arg4 = (
int *) 0 ;
16713 PyObject * obj0 = 0 ;
16714 PyObject * obj1 = 0 ;
16715 PyObject * obj2 = 0 ;
16716 PyObject * obj3 = 0 ;
16719 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ivec_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16720 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16721 if (!SWIG_IsOK(ecode1)) {
16722 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "ivec_hist" "', argument " "1"" of type '" "size_t""'");
16724 arg1 =
static_cast< size_t >(val1);
16725 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
16726 if (!SWIG_IsOK(res2)) {
16727 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ivec_hist" "', argument " "2"" of type '" "int const *""'");
16729 arg2 =
reinterpret_cast< int *
>(argp2);
16730 ecode3 = SWIG_AsVal_int(obj2, &val3);
16731 if (!SWIG_IsOK(ecode3)) {
16732 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ivec_hist" "', argument " "3"" of type '" "int""'");
16734 arg3 =
static_cast< int >(val3);
16735 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
16736 if (!SWIG_IsOK(res4)) {
16737 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ivec_hist" "', argument " "4"" of type '" "int *""'");
16739 arg4 =
reinterpret_cast< int *
>(argp4);
16741 Py_BEGIN_ALLOW_THREADS
16745 PyEval_RestoreThread(_save);
16747 if (PyErr_Occurred()) {
16750 PyErr_SetString(PyExc_RuntimeError, e.
what());
16754 Py_END_ALLOW_THREADS
16756 resultobj = SWIG_From_int(static_cast< int >(result));
16763 SWIGINTERN PyObject *_wrap_bincode_hist(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16764 PyObject *resultobj = 0;
16767 uint8_t *arg3 = (uint8_t *) 0 ;
16768 int *arg4 = (
int *) 0 ;
16777 PyObject * obj0 = 0 ;
16778 PyObject * obj1 = 0 ;
16779 PyObject * obj2 = 0 ;
16780 PyObject * obj3 = 0 ;
16782 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:bincode_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16783 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16784 if (!SWIG_IsOK(ecode1)) {
16785 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "bincode_hist" "', argument " "1"" of type '" "size_t""'");
16787 arg1 =
static_cast< size_t >(val1);
16788 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16789 if (!SWIG_IsOK(ecode2)) {
16790 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "bincode_hist" "', argument " "2"" of type '" "size_t""'");
16792 arg2 =
static_cast< size_t >(val2);
16793 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
16794 if (!SWIG_IsOK(res3)) {
16795 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "bincode_hist" "', argument " "3"" of type '" "uint8_t const *""'");
16797 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
16798 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
16799 if (!SWIG_IsOK(res4)) {
16800 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "bincode_hist" "', argument " "4"" of type '" "int *""'");
16802 arg4 =
reinterpret_cast< int *
>(argp4);
16804 Py_BEGIN_ALLOW_THREADS
16808 PyEval_RestoreThread(_save);
16810 if (PyErr_Occurred()) {
16813 PyErr_SetString(PyExc_RuntimeError, e.
what());
16817 Py_END_ALLOW_THREADS
16819 resultobj = SWIG_Py_Void();
16826 SWIGINTERN PyObject *_wrap_ivec_checksum(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16827 PyObject *resultobj = 0;
16829 int *arg2 = (
int *) 0 ;
16834 PyObject * obj0 = 0 ;
16835 PyObject * obj1 = 0 ;
16838 if (!PyArg_ParseTuple(args,(
char *)
"OO:ivec_checksum",&obj0,&obj1)) SWIG_fail;
16839 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16840 if (!SWIG_IsOK(ecode1)) {
16841 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "ivec_checksum" "', argument " "1"" of type '" "size_t""'");
16843 arg1 =
static_cast< size_t >(val1);
16844 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
16845 if (!SWIG_IsOK(res2)) {
16846 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ivec_checksum" "', argument " "2"" of type '" "int const *""'");
16848 arg2 =
reinterpret_cast< int *
>(argp2);
16850 Py_BEGIN_ALLOW_THREADS
16854 PyEval_RestoreThread(_save);
16856 if (PyErr_Occurred()) {
16859 PyErr_SetString(PyExc_RuntimeError, e.
what());
16863 Py_END_ALLOW_THREADS
16865 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16872 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16873 PyObject *resultobj = 0;
16875 size_t *arg2 = (
size_t *) 0 ;
16877 float *arg4 = (
float *) 0 ;
16892 PyObject * obj0 = 0 ;
16893 PyObject * obj1 = 0 ;
16894 PyObject * obj2 = 0 ;
16895 PyObject * obj3 = 0 ;
16896 PyObject * obj4 = 0 ;
16897 PyObject * obj5 = 0 ;
16898 float *result = 0 ;
16900 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
16901 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16902 if (!SWIG_IsOK(ecode1)) {
16903 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
16905 arg1 =
static_cast< size_t >(val1);
16906 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
16907 if (!SWIG_IsOK(res2)) {
16908 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
16910 arg2 =
reinterpret_cast< size_t *
>(argp2);
16911 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16912 if (!SWIG_IsOK(ecode3)) {
16913 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
16915 arg3 =
static_cast< size_t >(val3);
16916 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16917 if (!SWIG_IsOK(res4)) {
16918 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
16920 arg4 =
reinterpret_cast< float *
>(argp4);
16921 ecode5 = SWIG_AsVal_bool(obj4, &val5);
16922 if (!SWIG_IsOK(ecode5)) {
16923 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
16925 arg5 =
static_cast< bool >(val5);
16926 ecode6 = SWIG_AsVal_long(obj5, &val6);
16927 if (!SWIG_IsOK(ecode6)) {
16928 SWIG_exception_fail(SWIG_ArgError(ecode6),
"in method '" "fvecs_maybe_subsample" "', argument " "6"" of type '" "long""'");
16930 arg6 =
static_cast< long >(val6);
16932 Py_BEGIN_ALLOW_THREADS
16936 PyEval_RestoreThread(_save);
16938 if (PyErr_Occurred()) {
16941 PyErr_SetString(PyExc_RuntimeError, e.
what());
16945 Py_END_ALLOW_THREADS
16947 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
16954 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
16955 PyObject *resultobj = 0;
16957 size_t *arg2 = (
size_t *) 0 ;
16959 float *arg4 = (
float *) 0 ;
16971 PyObject * obj0 = 0 ;
16972 PyObject * obj1 = 0 ;
16973 PyObject * obj2 = 0 ;
16974 PyObject * obj3 = 0 ;
16975 PyObject * obj4 = 0 ;
16976 float *result = 0 ;
16978 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
16979 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16980 if (!SWIG_IsOK(ecode1)) {
16981 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
16983 arg1 =
static_cast< size_t >(val1);
16984 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
16985 if (!SWIG_IsOK(res2)) {
16986 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
16988 arg2 =
reinterpret_cast< size_t *
>(argp2);
16989 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16990 if (!SWIG_IsOK(ecode3)) {
16991 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
16993 arg3 =
static_cast< size_t >(val3);
16994 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16995 if (!SWIG_IsOK(res4)) {
16996 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
16998 arg4 =
reinterpret_cast< float *
>(argp4);
16999 ecode5 = SWIG_AsVal_bool(obj4, &val5);
17000 if (!SWIG_IsOK(ecode5)) {
17001 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
17003 arg5 =
static_cast< bool >(val5);
17005 Py_BEGIN_ALLOW_THREADS
17009 PyEval_RestoreThread(_save);
17011 if (PyErr_Occurred()) {
17014 PyErr_SetString(PyExc_RuntimeError, e.
what());
17018 Py_END_ALLOW_THREADS
17020 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
17027 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17028 PyObject *resultobj = 0;
17030 size_t *arg2 = (
size_t *) 0 ;
17032 float *arg4 = (
float *) 0 ;
17041 PyObject * obj0 = 0 ;
17042 PyObject * obj1 = 0 ;
17043 PyObject * obj2 = 0 ;
17044 PyObject * obj3 = 0 ;
17045 float *result = 0 ;
17047 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17048 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17049 if (!SWIG_IsOK(ecode1)) {
17050 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
17052 arg1 =
static_cast< size_t >(val1);
17053 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
17054 if (!SWIG_IsOK(res2)) {
17055 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
17057 arg2 =
reinterpret_cast< size_t *
>(argp2);
17058 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
17059 if (!SWIG_IsOK(ecode3)) {
17060 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
17062 arg3 =
static_cast< size_t >(val3);
17063 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17064 if (!SWIG_IsOK(res4)) {
17065 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
17067 arg4 =
reinterpret_cast< float *
>(argp4);
17069 Py_BEGIN_ALLOW_THREADS
17073 PyEval_RestoreThread(_save);
17075 if (PyErr_Occurred()) {
17078 PyErr_SetString(PyExc_RuntimeError, e.
what());
17082 Py_END_ALLOW_THREADS
17084 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
17091 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample(PyObject *
self, PyObject *args) {
17093 PyObject *argv[7] = {
17098 if (!PyTuple_Check(args)) SWIG_fail;
17099 argc = args ? PyObject_Length(args) : 0;
17100 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
17101 argv[ii] = PyTuple_GET_ITEM(args,ii);
17106 int res = SWIG_AsVal_size_t(argv[0], NULL);
17107 _v = SWIG_CheckState(res);
17111 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17112 _v = SWIG_CheckState(res);
17115 int res = SWIG_AsVal_size_t(argv[2], NULL);
17116 _v = SWIG_CheckState(res);
17120 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17121 _v = SWIG_CheckState(res);
17123 return _wrap_fvecs_maybe_subsample__SWIG_2(
self, args);
17132 int res = SWIG_AsVal_size_t(argv[0], NULL);
17133 _v = SWIG_CheckState(res);
17137 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17138 _v = SWIG_CheckState(res);
17141 int res = SWIG_AsVal_size_t(argv[2], NULL);
17142 _v = SWIG_CheckState(res);
17146 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17147 _v = SWIG_CheckState(res);
17150 int res = SWIG_AsVal_bool(argv[4], NULL);
17151 _v = SWIG_CheckState(res);
17154 return _wrap_fvecs_maybe_subsample__SWIG_1(
self, args);
17164 int res = SWIG_AsVal_size_t(argv[0], NULL);
17165 _v = SWIG_CheckState(res);
17169 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17170 _v = SWIG_CheckState(res);
17173 int res = SWIG_AsVal_size_t(argv[2], NULL);
17174 _v = SWIG_CheckState(res);
17178 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17179 _v = SWIG_CheckState(res);
17182 int res = SWIG_AsVal_bool(argv[4], NULL);
17183 _v = SWIG_CheckState(res);
17187 int res = SWIG_AsVal_long(argv[5], NULL);
17188 _v = SWIG_CheckState(res);
17191 return _wrap_fvecs_maybe_subsample__SWIG_0(
self, args);
17201 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'fvecs_maybe_subsample'.\n"
17202 " Possible C/C++ prototypes are:\n"
17203 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool,long)\n"
17204 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool)\n"
17205 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *)\n");
17210 SWIGINTERN PyObject *_wrap_binary_to_real(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17211 PyObject *resultobj = 0;
17213 uint8_t *arg2 = (uint8_t *) 0 ;
17214 float *arg3 = (
float *) 0 ;
17221 PyObject * obj0 = 0 ;
17222 PyObject * obj1 = 0 ;
17223 PyObject * obj2 = 0 ;
17225 if (!PyArg_ParseTuple(args,(
char *)
"OOO:binary_to_real",&obj0,&obj1,&obj2)) SWIG_fail;
17226 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17227 if (!SWIG_IsOK(ecode1)) {
17228 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "binary_to_real" "', argument " "1"" of type '" "size_t""'");
17230 arg1 =
static_cast< size_t >(val1);
17231 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
17232 if (!SWIG_IsOK(res2)) {
17233 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "binary_to_real" "', argument " "2"" of type '" "uint8_t const *""'");
17235 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
17236 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17237 if (!SWIG_IsOK(res3)) {
17238 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "binary_to_real" "', argument " "3"" of type '" "float *""'");
17240 arg3 =
reinterpret_cast< float *
>(argp3);
17242 Py_BEGIN_ALLOW_THREADS
17246 PyEval_RestoreThread(_save);
17248 if (PyErr_Occurred()) {
17251 PyErr_SetString(PyExc_RuntimeError, e.
what());
17255 Py_END_ALLOW_THREADS
17257 resultobj = SWIG_Py_Void();
17264 SWIGINTERN PyObject *_wrap_real_to_binary(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17265 PyObject *resultobj = 0;
17267 float *arg2 = (
float *) 0 ;
17268 uint8_t *arg3 = (uint8_t *) 0 ;
17275 PyObject * obj0 = 0 ;
17276 PyObject * obj1 = 0 ;
17277 PyObject * obj2 = 0 ;
17279 if (!PyArg_ParseTuple(args,(
char *)
"OOO:real_to_binary",&obj0,&obj1,&obj2)) SWIG_fail;
17280 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17281 if (!SWIG_IsOK(ecode1)) {
17282 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "real_to_binary" "', argument " "1"" of type '" "size_t""'");
17284 arg1 =
static_cast< size_t >(val1);
17285 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
17286 if (!SWIG_IsOK(res2)) {
17287 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "real_to_binary" "', argument " "2"" of type '" "float const *""'");
17289 arg2 =
reinterpret_cast< float *
>(argp2);
17290 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
17291 if (!SWIG_IsOK(res3)) {
17292 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "real_to_binary" "', argument " "3"" of type '" "uint8_t *""'");
17294 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
17296 Py_BEGIN_ALLOW_THREADS
17300 PyEval_RestoreThread(_save);
17302 if (PyErr_Occurred()) {
17305 PyErr_SetString(PyExc_RuntimeError, e.
what());
17309 Py_END_ALLOW_THREADS
17311 resultobj = SWIG_Py_Void();
17318 SWIGINTERN PyObject *_wrap_hash_bytes(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17319 PyObject *resultobj = 0;
17320 uint8_t *arg1 = (uint8_t *) 0 ;
17326 PyObject * obj0 = 0 ;
17327 PyObject * obj1 = 0 ;
17330 if (!PyArg_ParseTuple(args,(
char *)
"OO:hash_bytes",&obj0,&obj1)) SWIG_fail;
17331 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
17332 if (!SWIG_IsOK(res1)) {
17333 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "hash_bytes" "', argument " "1"" of type '" "uint8_t const *""'");
17335 arg1 =
reinterpret_cast< uint8_t *
>(argp1);
17336 ecode2 = SWIG_AsVal_long(obj1, &val2);
17337 if (!SWIG_IsOK(ecode2)) {
17338 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "hash_bytes" "', argument " "2"" of type '" "long""'");
17340 arg2 =
static_cast< long >(val2);
17342 Py_BEGIN_ALLOW_THREADS
17346 PyEval_RestoreThread(_save);
17348 if (PyErr_Occurred()) {
17351 PyErr_SetString(PyExc_RuntimeError, e.
what());
17355 Py_END_ALLOW_THREADS
17357 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
17364 SWIGINTERN PyObject *_wrap_check_openmp(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17365 PyObject *resultobj = 0;
17368 if (!PyArg_ParseTuple(args,(
char *)
":check_openmp")) SWIG_fail;
17370 Py_BEGIN_ALLOW_THREADS
17374 PyEval_RestoreThread(_save);
17376 if (PyErr_Occurred()) {
17379 PyErr_SetString(PyExc_RuntimeError, e.
what());
17383 Py_END_ALLOW_THREADS
17385 resultobj = SWIG_From_bool(static_cast< bool >(result));
17392 SWIGINTERN PyObject *_wrap_Index_d_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17393 PyObject *resultobj = 0;
17400 PyObject * obj0 = 0 ;
17401 PyObject * obj1 = 0 ;
17403 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_d_set",&obj0,&obj1)) SWIG_fail;
17404 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17405 if (!SWIG_IsOK(res1)) {
17406 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_d_set" "', argument " "1"" of type '" "faiss::Index *""'");
17409 ecode2 = SWIG_AsVal_int(obj1, &val2);
17410 if (!SWIG_IsOK(ecode2)) {
17411 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_d_set" "', argument " "2"" of type '" "int""'");
17413 arg2 =
static_cast< int >(val2);
17414 if (arg1) (arg1)->d = arg2;
17415 resultobj = SWIG_Py_Void();
17422 SWIGINTERN PyObject *_wrap_Index_d_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17423 PyObject *resultobj = 0;
17427 PyObject * obj0 = 0 ;
17430 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_d_get",&obj0)) SWIG_fail;
17431 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17432 if (!SWIG_IsOK(res1)) {
17433 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_d_get" "', argument " "1"" of type '" "faiss::Index *""'");
17436 result = (int) ((arg1)->d);
17437 resultobj = SWIG_From_int(static_cast< int >(result));
17444 SWIGINTERN PyObject *_wrap_Index_ntotal_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17445 PyObject *resultobj = 0;
17452 PyObject * obj0 = 0 ;
17453 PyObject * obj1 = 0 ;
17455 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_ntotal_set",&obj0,&obj1)) SWIG_fail;
17456 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17457 if (!SWIG_IsOK(res1)) {
17458 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_ntotal_set" "', argument " "1"" of type '" "faiss::Index *""'");
17461 ecode2 = SWIG_AsVal_long(obj1, &val2);
17462 if (!SWIG_IsOK(ecode2)) {
17463 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_ntotal_set" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17466 if (arg1) (arg1)->ntotal = arg2;
17467 resultobj = SWIG_Py_Void();
17474 SWIGINTERN PyObject *_wrap_Index_ntotal_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17475 PyObject *resultobj = 0;
17479 PyObject * obj0 = 0 ;
17482 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_ntotal_get",&obj0)) SWIG_fail;
17483 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17484 if (!SWIG_IsOK(res1)) {
17485 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_ntotal_get" "', argument " "1"" of type '" "faiss::Index *""'");
17489 resultobj = SWIG_From_long(static_cast< long >(result));
17496 SWIGINTERN PyObject *_wrap_Index_verbose_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17497 PyObject *resultobj = 0;
17504 PyObject * obj0 = 0 ;
17505 PyObject * obj1 = 0 ;
17507 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_verbose_set",&obj0,&obj1)) SWIG_fail;
17508 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17509 if (!SWIG_IsOK(res1)) {
17510 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_verbose_set" "', argument " "1"" of type '" "faiss::Index *""'");
17513 ecode2 = SWIG_AsVal_bool(obj1, &val2);
17514 if (!SWIG_IsOK(ecode2)) {
17515 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_verbose_set" "', argument " "2"" of type '" "bool""'");
17517 arg2 =
static_cast< bool >(val2);
17518 if (arg1) (arg1)->verbose = arg2;
17519 resultobj = SWIG_Py_Void();
17526 SWIGINTERN PyObject *_wrap_Index_verbose_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17527 PyObject *resultobj = 0;
17531 PyObject * obj0 = 0 ;
17534 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_verbose_get",&obj0)) SWIG_fail;
17535 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17536 if (!SWIG_IsOK(res1)) {
17537 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_verbose_get" "', argument " "1"" of type '" "faiss::Index *""'");
17540 result = (bool) ((arg1)->verbose);
17541 resultobj = SWIG_From_bool(static_cast< bool >(result));
17548 SWIGINTERN PyObject *_wrap_Index_is_trained_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17549 PyObject *resultobj = 0;
17556 PyObject * obj0 = 0 ;
17557 PyObject * obj1 = 0 ;
17559 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_is_trained_set",&obj0,&obj1)) SWIG_fail;
17560 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17561 if (!SWIG_IsOK(res1)) {
17562 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_is_trained_set" "', argument " "1"" of type '" "faiss::Index *""'");
17565 ecode2 = SWIG_AsVal_bool(obj1, &val2);
17566 if (!SWIG_IsOK(ecode2)) {
17567 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_is_trained_set" "', argument " "2"" of type '" "bool""'");
17569 arg2 =
static_cast< bool >(val2);
17570 if (arg1) (arg1)->is_trained = arg2;
17571 resultobj = SWIG_Py_Void();
17578 SWIGINTERN PyObject *_wrap_Index_is_trained_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17579 PyObject *resultobj = 0;
17583 PyObject * obj0 = 0 ;
17586 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_is_trained_get",&obj0)) SWIG_fail;
17587 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17588 if (!SWIG_IsOK(res1)) {
17589 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_is_trained_get" "', argument " "1"" of type '" "faiss::Index *""'");
17592 result = (bool) ((arg1)->is_trained);
17593 resultobj = SWIG_From_bool(static_cast< bool >(result));
17600 SWIGINTERN PyObject *_wrap_Index_metric_type_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17601 PyObject *resultobj = 0;
17608 PyObject * obj0 = 0 ;
17609 PyObject * obj1 = 0 ;
17611 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_metric_type_set",&obj0,&obj1)) SWIG_fail;
17612 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17613 if (!SWIG_IsOK(res1)) {
17614 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_metric_type_set" "', argument " "1"" of type '" "faiss::Index *""'");
17617 ecode2 = SWIG_AsVal_int(obj1, &val2);
17618 if (!SWIG_IsOK(ecode2)) {
17619 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_metric_type_set" "', argument " "2"" of type '" "faiss::MetricType""'");
17622 if (arg1) (arg1)->metric_type = arg2;
17623 resultobj = SWIG_Py_Void();
17630 SWIGINTERN PyObject *_wrap_Index_metric_type_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17631 PyObject *resultobj = 0;
17635 PyObject * obj0 = 0 ;
17638 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_metric_type_get",&obj0)) SWIG_fail;
17639 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17640 if (!SWIG_IsOK(res1)) {
17641 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_metric_type_get" "', argument " "1"" of type '" "faiss::Index *""'");
17645 resultobj = SWIG_From_int(static_cast< int >(result));
17652 SWIGINTERN PyObject *_wrap_delete_Index(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17653 PyObject *resultobj = 0;
17657 PyObject * obj0 = 0 ;
17659 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_Index",&obj0)) SWIG_fail;
17660 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
17661 if (!SWIG_IsOK(res1)) {
17662 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_Index" "', argument " "1"" of type '" "faiss::Index *""'");
17666 Py_BEGIN_ALLOW_THREADS
17670 PyEval_RestoreThread(_save);
17672 if (PyErr_Occurred()) {
17675 PyErr_SetString(PyExc_RuntimeError, e.
what());
17679 Py_END_ALLOW_THREADS
17681 resultobj = SWIG_Py_Void();
17688 SWIGINTERN PyObject *_wrap_Index_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17689 PyObject *resultobj = 0;
17692 float *arg3 = (
float *) 0 ;
17699 PyObject * obj0 = 0 ;
17700 PyObject * obj1 = 0 ;
17701 PyObject * obj2 = 0 ;
17703 if (!PyArg_ParseTuple(args,(
char *)
"OOO:Index_train",&obj0,&obj1,&obj2)) SWIG_fail;
17704 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17705 if (!SWIG_IsOK(res1)) {
17706 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_train" "', argument " "1"" of type '" "faiss::Index *""'");
17709 ecode2 = SWIG_AsVal_long(obj1, &val2);
17710 if (!SWIG_IsOK(ecode2)) {
17711 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17714 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17715 if (!SWIG_IsOK(res3)) {
17716 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_train" "', argument " "3"" of type '" "float const *""'");
17718 arg3 =
reinterpret_cast< float *
>(argp3);
17720 Py_BEGIN_ALLOW_THREADS
17722 (arg1)->train(arg2,(
float const *)arg3);
17724 PyEval_RestoreThread(_save);
17726 if (PyErr_Occurred()) {
17729 PyErr_SetString(PyExc_RuntimeError, e.
what());
17733 Py_END_ALLOW_THREADS
17735 resultobj = SWIG_Py_Void();
17742 SWIGINTERN PyObject *_wrap_Index_add(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17743 PyObject *resultobj = 0;
17746 float *arg3 = (
float *) 0 ;
17753 PyObject * obj0 = 0 ;
17754 PyObject * obj1 = 0 ;
17755 PyObject * obj2 = 0 ;
17757 if (!PyArg_ParseTuple(args,(
char *)
"OOO:Index_add",&obj0,&obj1,&obj2)) SWIG_fail;
17758 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17759 if (!SWIG_IsOK(res1)) {
17760 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_add" "', argument " "1"" of type '" "faiss::Index *""'");
17763 ecode2 = SWIG_AsVal_long(obj1, &val2);
17764 if (!SWIG_IsOK(ecode2)) {
17765 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17768 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17769 if (!SWIG_IsOK(res3)) {
17770 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_add" "', argument " "3"" of type '" "float const *""'");
17772 arg3 =
reinterpret_cast< float *
>(argp3);
17774 Py_BEGIN_ALLOW_THREADS
17776 (arg1)->add(arg2,(
float const *)arg3);
17778 PyEval_RestoreThread(_save);
17780 if (PyErr_Occurred()) {
17783 PyErr_SetString(PyExc_RuntimeError, e.
what());
17787 Py_END_ALLOW_THREADS
17789 resultobj = SWIG_Py_Void();
17796 SWIGINTERN PyObject *_wrap_Index_add_with_ids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17797 PyObject *resultobj = 0;
17800 float *arg3 = (
float *) 0 ;
17801 long *arg4 = (
long *) 0 ;
17810 PyObject * obj0 = 0 ;
17811 PyObject * obj1 = 0 ;
17812 PyObject * obj2 = 0 ;
17813 PyObject * obj3 = 0 ;
17815 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:Index_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17816 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17817 if (!SWIG_IsOK(res1)) {
17818 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_add_with_ids" "', argument " "1"" of type '" "faiss::Index *""'");
17821 ecode2 = SWIG_AsVal_long(obj1, &val2);
17822 if (!SWIG_IsOK(ecode2)) {
17823 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17826 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17827 if (!SWIG_IsOK(res3)) {
17828 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_add_with_ids" "', argument " "3"" of type '" "float const *""'");
17830 arg3 =
reinterpret_cast< float *
>(argp3);
17831 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
17832 if (!SWIG_IsOK(res4)) {
17833 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "Index_add_with_ids" "', argument " "4"" of type '" "long const *""'");
17835 arg4 =
reinterpret_cast< long *
>(argp4);
17837 Py_BEGIN_ALLOW_THREADS
17839 (arg1)->add_with_ids(arg2,(
float const *)arg3,(
long const *)arg4);
17841 PyEval_RestoreThread(_save);
17843 if (PyErr_Occurred()) {
17846 PyErr_SetString(PyExc_RuntimeError, e.
what());
17850 Py_END_ALLOW_THREADS
17852 resultobj = SWIG_Py_Void();
17859 SWIGINTERN PyObject *_wrap_Index_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17860 PyObject *resultobj = 0;
17863 float *arg3 = (
float *) 0 ;
17865 float *arg5 = (
float *) 0 ;
17879 PyObject * obj0 = 0 ;
17880 PyObject * obj1 = 0 ;
17881 PyObject * obj2 = 0 ;
17882 PyObject * obj3 = 0 ;
17883 PyObject * obj4 = 0 ;
17884 PyObject * obj5 = 0 ;
17886 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:Index_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
17887 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17888 if (!SWIG_IsOK(res1)) {
17889 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_search" "', argument " "1"" of type '" "faiss::Index const *""'");
17892 ecode2 = SWIG_AsVal_long(obj1, &val2);
17893 if (!SWIG_IsOK(ecode2)) {
17894 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17897 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17898 if (!SWIG_IsOK(res3)) {
17899 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_search" "', argument " "3"" of type '" "float const *""'");
17901 arg3 =
reinterpret_cast< float *
>(argp3);
17902 ecode4 = SWIG_AsVal_long(obj3, &val4);
17903 if (!SWIG_IsOK(ecode4)) {
17904 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "Index_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
17907 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
17908 if (!SWIG_IsOK(res5)) {
17909 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "Index_search" "', argument " "5"" of type '" "float *""'");
17911 arg5 =
reinterpret_cast< float *
>(argp5);
17912 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
17913 if (!SWIG_IsOK(res6)) {
17914 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "Index_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
17918 Py_BEGIN_ALLOW_THREADS
17920 ((
faiss::Index const *)arg1)->search(arg2,(
float const *)arg3,arg4,arg5,arg6);
17922 PyEval_RestoreThread(_save);
17924 if (PyErr_Occurred()) {
17927 PyErr_SetString(PyExc_RuntimeError, e.
what());
17931 Py_END_ALLOW_THREADS
17933 resultobj = SWIG_Py_Void();
17940 SWIGINTERN PyObject *_wrap_Index_range_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
17941 PyObject *resultobj = 0;
17944 float *arg3 = (
float *) 0 ;
17957 PyObject * obj0 = 0 ;
17958 PyObject * obj1 = 0 ;
17959 PyObject * obj2 = 0 ;
17960 PyObject * obj3 = 0 ;
17961 PyObject * obj4 = 0 ;
17963 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:Index_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
17964 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17965 if (!SWIG_IsOK(res1)) {
17966 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_range_search" "', argument " "1"" of type '" "faiss::Index const *""'");
17969 ecode2 = SWIG_AsVal_long(obj1, &val2);
17970 if (!SWIG_IsOK(ecode2)) {
17971 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17974 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17975 if (!SWIG_IsOK(res3)) {
17976 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_range_search" "', argument " "3"" of type '" "float const *""'");
17978 arg3 =
reinterpret_cast< float *
>(argp3);
17979 ecode4 = SWIG_AsVal_float(obj3, &val4);
17980 if (!SWIG_IsOK(ecode4)) {
17981 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "Index_range_search" "', argument " "4"" of type '" "float""'");
17983 arg4 =
static_cast< float >(val4);
17984 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
17985 if (!SWIG_IsOK(res5)) {
17986 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "Index_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
17990 Py_BEGIN_ALLOW_THREADS
17992 ((
faiss::Index const *)arg1)->range_search(arg2,(
float const *)arg3,arg4,arg5);
17994 PyEval_RestoreThread(_save);
17996 if (PyErr_Occurred()) {
17999 PyErr_SetString(PyExc_RuntimeError, e.
what());
18003 Py_END_ALLOW_THREADS
18005 resultobj = SWIG_Py_Void();
18012 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18013 PyObject *resultobj = 0;
18016 float *arg3 = (
float *) 0 ;
18029 PyObject * obj0 = 0 ;
18030 PyObject * obj1 = 0 ;
18031 PyObject * obj2 = 0 ;
18032 PyObject * obj3 = 0 ;
18033 PyObject * obj4 = 0 ;
18035 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:Index_assign",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
18036 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18037 if (!SWIG_IsOK(res1)) {
18038 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
18041 ecode2 = SWIG_AsVal_long(obj1, &val2);
18042 if (!SWIG_IsOK(ecode2)) {
18043 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18046 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18047 if (!SWIG_IsOK(res3)) {
18048 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
18050 arg3 =
reinterpret_cast< float *
>(argp3);
18051 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
18052 if (!SWIG_IsOK(res4)) {
18053 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
18056 ecode5 = SWIG_AsVal_long(obj4, &val5);
18057 if (!SWIG_IsOK(ecode5)) {
18058 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "Index_assign" "', argument " "5"" of type '" "faiss::Index::idx_t""'");
18062 Py_BEGIN_ALLOW_THREADS
18064 (arg1)->assign(arg2,(
float const *)arg3,arg4,arg5);
18066 PyEval_RestoreThread(_save);
18068 if (PyErr_Occurred()) {
18071 PyErr_SetString(PyExc_RuntimeError, e.
what());
18075 Py_END_ALLOW_THREADS
18077 resultobj = SWIG_Py_Void();
18084 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18085 PyObject *resultobj = 0;
18088 float *arg3 = (
float *) 0 ;
18098 PyObject * obj0 = 0 ;
18099 PyObject * obj1 = 0 ;
18100 PyObject * obj2 = 0 ;
18101 PyObject * obj3 = 0 ;
18103 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:Index_assign",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18104 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18105 if (!SWIG_IsOK(res1)) {
18106 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
18109 ecode2 = SWIG_AsVal_long(obj1, &val2);
18110 if (!SWIG_IsOK(ecode2)) {
18111 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18114 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18115 if (!SWIG_IsOK(res3)) {
18116 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
18118 arg3 =
reinterpret_cast< float *
>(argp3);
18119 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
18120 if (!SWIG_IsOK(res4)) {
18121 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
18125 Py_BEGIN_ALLOW_THREADS
18127 (arg1)->assign(arg2,(
float const *)arg3,arg4);
18129 PyEval_RestoreThread(_save);
18131 if (PyErr_Occurred()) {
18134 PyErr_SetString(PyExc_RuntimeError, e.
what());
18138 Py_END_ALLOW_THREADS
18140 resultobj = SWIG_Py_Void();
18147 SWIGINTERN PyObject *_wrap_Index_assign(PyObject *
self, PyObject *args) {
18149 PyObject *argv[6] = {
18154 if (!PyTuple_Check(args)) SWIG_fail;
18155 argc = args ? PyObject_Length(args) : 0;
18156 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
18157 argv[ii] = PyTuple_GET_ITEM(args,ii);
18162 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
18163 _v = SWIG_CheckState(res);
18166 int res = SWIG_AsVal_long(argv[1], NULL);
18167 _v = SWIG_CheckState(res);
18171 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
18172 _v = SWIG_CheckState(res);
18175 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
18176 _v = SWIG_CheckState(res);
18178 return _wrap_Index_assign__SWIG_1(
self, args);
18187 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
18188 _v = SWIG_CheckState(res);
18191 int res = SWIG_AsVal_long(argv[1], NULL);
18192 _v = SWIG_CheckState(res);
18196 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
18197 _v = SWIG_CheckState(res);
18200 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
18201 _v = SWIG_CheckState(res);
18204 int res = SWIG_AsVal_long(argv[4], NULL);
18205 _v = SWIG_CheckState(res);
18208 return _wrap_Index_assign__SWIG_0(
self, args);
18217 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'Index_assign'.\n"
18218 " Possible C/C++ prototypes are:\n"
18219 " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *,faiss::Index::idx_t)\n"
18220 " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *)\n");
18225 SWIGINTERN PyObject *_wrap_Index_reset(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18226 PyObject *resultobj = 0;
18230 PyObject * obj0 = 0 ;
18232 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_reset",&obj0)) SWIG_fail;
18233 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18234 if (!SWIG_IsOK(res1)) {
18235 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_reset" "', argument " "1"" of type '" "faiss::Index *""'");
18239 Py_BEGIN_ALLOW_THREADS
18243 PyEval_RestoreThread(_save);
18245 if (PyErr_Occurred()) {
18248 PyErr_SetString(PyExc_RuntimeError, e.
what());
18252 Py_END_ALLOW_THREADS
18254 resultobj = SWIG_Py_Void();
18261 SWIGINTERN PyObject *_wrap_Index_remove_ids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18262 PyObject *resultobj = 0;
18269 PyObject * obj0 = 0 ;
18270 PyObject * obj1 = 0 ;
18273 if (!PyArg_ParseTuple(args,(
char *)
"OO:Index_remove_ids",&obj0,&obj1)) SWIG_fail;
18274 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18275 if (!SWIG_IsOK(res1)) {
18276 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_remove_ids" "', argument " "1"" of type '" "faiss::Index *""'");
18279 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
18280 if (!SWIG_IsOK(res2)) {
18281 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
18284 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
18288 Py_BEGIN_ALLOW_THREADS
18292 PyEval_RestoreThread(_save);
18294 if (PyErr_Occurred()) {
18297 PyErr_SetString(PyExc_RuntimeError, e.
what());
18301 Py_END_ALLOW_THREADS
18303 resultobj = SWIG_From_long(static_cast< long >(result));
18310 SWIGINTERN PyObject *_wrap_Index_reconstruct(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18311 PyObject *resultobj = 0;
18314 float *arg3 = (
float *) 0 ;
18321 PyObject * obj0 = 0 ;
18322 PyObject * obj1 = 0 ;
18323 PyObject * obj2 = 0 ;
18325 if (!PyArg_ParseTuple(args,(
char *)
"OOO:Index_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
18326 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18327 if (!SWIG_IsOK(res1)) {
18328 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
18331 ecode2 = SWIG_AsVal_long(obj1, &val2);
18332 if (!SWIG_IsOK(ecode2)) {
18333 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18336 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18337 if (!SWIG_IsOK(res3)) {
18338 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_reconstruct" "', argument " "3"" of type '" "float *""'");
18340 arg3 =
reinterpret_cast< float *
>(argp3);
18342 Py_BEGIN_ALLOW_THREADS
18346 PyEval_RestoreThread(_save);
18348 if (PyErr_Occurred()) {
18351 PyErr_SetString(PyExc_RuntimeError, e.
what());
18355 Py_END_ALLOW_THREADS
18357 resultobj = SWIG_Py_Void();
18364 SWIGINTERN PyObject *_wrap_Index_reconstruct_n(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18365 PyObject *resultobj = 0;
18369 float *arg4 = (
float *) 0 ;
18378 PyObject * obj0 = 0 ;
18379 PyObject * obj1 = 0 ;
18380 PyObject * obj2 = 0 ;
18381 PyObject * obj3 = 0 ;
18383 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:Index_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18384 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18385 if (!SWIG_IsOK(res1)) {
18386 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_reconstruct_n" "', argument " "1"" of type '" "faiss::Index const *""'");
18389 ecode2 = SWIG_AsVal_long(obj1, &val2);
18390 if (!SWIG_IsOK(ecode2)) {
18391 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18394 ecode3 = SWIG_AsVal_long(obj2, &val3);
18395 if (!SWIG_IsOK(ecode3)) {
18396 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "Index_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
18399 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
18400 if (!SWIG_IsOK(res4)) {
18401 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "Index_reconstruct_n" "', argument " "4"" of type '" "float *""'");
18403 arg4 =
reinterpret_cast< float *
>(argp4);
18405 Py_BEGIN_ALLOW_THREADS
18407 ((
faiss::Index const *)arg1)->reconstruct_n(arg2,arg3,arg4);
18409 PyEval_RestoreThread(_save);
18411 if (PyErr_Occurred()) {
18414 PyErr_SetString(PyExc_RuntimeError, e.
what());
18418 Py_END_ALLOW_THREADS
18420 resultobj = SWIG_Py_Void();
18427 SWIGINTERN PyObject *_wrap_Index_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18428 PyObject *resultobj = 0;
18431 float *arg3 = (
float *) 0 ;
18433 float *arg5 = (
float *) 0 ;
18435 float *arg7 = (
float *) 0 ;
18450 PyObject * obj0 = 0 ;
18451 PyObject * obj1 = 0 ;
18452 PyObject * obj2 = 0 ;
18453 PyObject * obj3 = 0 ;
18454 PyObject * obj4 = 0 ;
18455 PyObject * obj5 = 0 ;
18456 PyObject * obj6 = 0 ;
18458 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:Index_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
18459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18460 if (!SWIG_IsOK(res1)) {
18461 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_search_and_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
18464 ecode2 = SWIG_AsVal_long(obj1, &val2);
18465 if (!SWIG_IsOK(ecode2)) {
18466 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Index_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18469 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18470 if (!SWIG_IsOK(res3)) {
18471 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
18473 arg3 =
reinterpret_cast< float *
>(argp3);
18474 ecode4 = SWIG_AsVal_long(obj3, &val4);
18475 if (!SWIG_IsOK(ecode4)) {
18476 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "Index_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
18479 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
18480 if (!SWIG_IsOK(res5)) {
18481 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "Index_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
18483 arg5 =
reinterpret_cast< float *
>(argp5);
18484 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
18485 if (!SWIG_IsOK(res6)) {
18486 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "Index_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
18489 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
18490 if (!SWIG_IsOK(res7)) {
18491 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "Index_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
18493 arg7 =
reinterpret_cast< float *
>(argp7);
18495 Py_BEGIN_ALLOW_THREADS
18497 ((
faiss::Index const *)arg1)->search_and_reconstruct(arg2,(
float const *)arg3,arg4,arg5,arg6,arg7);
18499 PyEval_RestoreThread(_save);
18501 if (PyErr_Occurred()) {
18504 PyErr_SetString(PyExc_RuntimeError, e.
what());
18508 Py_END_ALLOW_THREADS
18510 resultobj = SWIG_Py_Void();
18517 SWIGINTERN PyObject *_wrap_Index_compute_residual(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18518 PyObject *resultobj = 0;
18520 float *arg2 = (
float *) 0 ;
18521 float *arg3 = (
float *) 0 ;
18531 PyObject * obj0 = 0 ;
18532 PyObject * obj1 = 0 ;
18533 PyObject * obj2 = 0 ;
18534 PyObject * obj3 = 0 ;
18536 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:Index_compute_residual",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18538 if (!SWIG_IsOK(res1)) {
18539 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_compute_residual" "', argument " "1"" of type '" "faiss::Index const *""'");
18542 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
18543 if (!SWIG_IsOK(res2)) {
18544 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "Index_compute_residual" "', argument " "2"" of type '" "float const *""'");
18546 arg2 =
reinterpret_cast< float *
>(argp2);
18547 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18548 if (!SWIG_IsOK(res3)) {
18549 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Index_compute_residual" "', argument " "3"" of type '" "float *""'");
18551 arg3 =
reinterpret_cast< float *
>(argp3);
18552 ecode4 = SWIG_AsVal_long(obj3, &val4);
18553 if (!SWIG_IsOK(ecode4)) {
18554 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "Index_compute_residual" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
18558 Py_BEGIN_ALLOW_THREADS
18560 ((
faiss::Index const *)arg1)->compute_residual((
float const *)arg2,arg3,arg4);
18562 PyEval_RestoreThread(_save);
18564 if (PyErr_Occurred()) {
18567 PyErr_SetString(PyExc_RuntimeError, e.
what());
18571 Py_END_ALLOW_THREADS
18573 resultobj = SWIG_Py_Void();
18580 SWIGINTERN PyObject *_wrap_Index_display(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18581 PyObject *resultobj = 0;
18585 PyObject * obj0 = 0 ;
18587 if (!PyArg_ParseTuple(args,(
char *)
"O:Index_display",&obj0)) SWIG_fail;
18588 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18589 if (!SWIG_IsOK(res1)) {
18590 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Index_display" "', argument " "1"" of type '" "faiss::Index const *""'");
18594 Py_BEGIN_ALLOW_THREADS
18598 PyEval_RestoreThread(_save);
18600 if (PyErr_Occurred()) {
18603 PyErr_SetString(PyExc_RuntimeError, e.
what());
18607 Py_END_ALLOW_THREADS
18609 resultobj = SWIG_Py_Void();
18616 SWIGINTERN PyObject *Index_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18618 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
18619 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Index, SWIG_NewClientData(obj));
18620 return SWIG_Py_Void();
18623 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18624 PyObject *resultobj = 0;
18631 PyObject * obj0 = 0 ;
18632 PyObject * obj1 = 0 ;
18634 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_niter_set",&obj0,&obj1)) SWIG_fail;
18635 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18636 if (!SWIG_IsOK(res1)) {
18637 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_niter_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18640 ecode2 = SWIG_AsVal_int(obj1, &val2);
18641 if (!SWIG_IsOK(ecode2)) {
18642 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_niter_set" "', argument " "2"" of type '" "int""'");
18644 arg2 =
static_cast< int >(val2);
18645 if (arg1) (arg1)->niter = arg2;
18646 resultobj = SWIG_Py_Void();
18653 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18654 PyObject *resultobj = 0;
18658 PyObject * obj0 = 0 ;
18661 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_niter_get",&obj0)) SWIG_fail;
18662 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18663 if (!SWIG_IsOK(res1)) {
18664 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_niter_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18667 result = (int) ((arg1)->niter);
18668 resultobj = SWIG_From_int(static_cast< int >(result));
18675 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18676 PyObject *resultobj = 0;
18683 PyObject * obj0 = 0 ;
18684 PyObject * obj1 = 0 ;
18686 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_nredo_set",&obj0,&obj1)) SWIG_fail;
18687 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18688 if (!SWIG_IsOK(res1)) {
18689 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_nredo_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18692 ecode2 = SWIG_AsVal_int(obj1, &val2);
18693 if (!SWIG_IsOK(ecode2)) {
18694 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_nredo_set" "', argument " "2"" of type '" "int""'");
18696 arg2 =
static_cast< int >(val2);
18697 if (arg1) (arg1)->nredo = arg2;
18698 resultobj = SWIG_Py_Void();
18705 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18706 PyObject *resultobj = 0;
18710 PyObject * obj0 = 0 ;
18713 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_nredo_get",&obj0)) SWIG_fail;
18714 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18715 if (!SWIG_IsOK(res1)) {
18716 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_nredo_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18719 result = (int) ((arg1)->nredo);
18720 resultobj = SWIG_From_int(static_cast< int >(result));
18727 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18728 PyObject *resultobj = 0;
18735 PyObject * obj0 = 0 ;
18736 PyObject * obj1 = 0 ;
18738 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_verbose_set",&obj0,&obj1)) SWIG_fail;
18739 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18740 if (!SWIG_IsOK(res1)) {
18741 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_verbose_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18744 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18745 if (!SWIG_IsOK(ecode2)) {
18746 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_verbose_set" "', argument " "2"" of type '" "bool""'");
18748 arg2 =
static_cast< bool >(val2);
18749 if (arg1) (arg1)->verbose = arg2;
18750 resultobj = SWIG_Py_Void();
18757 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18758 PyObject *resultobj = 0;
18762 PyObject * obj0 = 0 ;
18765 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_verbose_get",&obj0)) SWIG_fail;
18766 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18767 if (!SWIG_IsOK(res1)) {
18768 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_verbose_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18771 result = (bool) ((arg1)->verbose);
18772 resultobj = SWIG_From_bool(static_cast< bool >(result));
18779 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18780 PyObject *resultobj = 0;
18787 PyObject * obj0 = 0 ;
18788 PyObject * obj1 = 0 ;
18790 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_spherical_set",&obj0,&obj1)) SWIG_fail;
18791 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18792 if (!SWIG_IsOK(res1)) {
18793 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_spherical_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18796 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18797 if (!SWIG_IsOK(ecode2)) {
18798 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_spherical_set" "', argument " "2"" of type '" "bool""'");
18800 arg2 =
static_cast< bool >(val2);
18801 if (arg1) (arg1)->spherical = arg2;
18802 resultobj = SWIG_Py_Void();
18809 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18810 PyObject *resultobj = 0;
18814 PyObject * obj0 = 0 ;
18817 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_spherical_get",&obj0)) SWIG_fail;
18818 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18819 if (!SWIG_IsOK(res1)) {
18820 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_spherical_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18823 result = (bool) ((arg1)->spherical);
18824 resultobj = SWIG_From_bool(static_cast< bool >(result));
18831 SWIGINTERN PyObject *_wrap_ClusteringParameters_int_centroids_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18832 PyObject *resultobj = 0;
18839 PyObject * obj0 = 0 ;
18840 PyObject * obj1 = 0 ;
18842 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_int_centroids_set",&obj0,&obj1)) SWIG_fail;
18843 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18844 if (!SWIG_IsOK(res1)) {
18845 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_int_centroids_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18848 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18849 if (!SWIG_IsOK(ecode2)) {
18850 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_int_centroids_set" "', argument " "2"" of type '" "bool""'");
18852 arg2 =
static_cast< bool >(val2);
18853 if (arg1) (arg1)->int_centroids = arg2;
18854 resultobj = SWIG_Py_Void();
18861 SWIGINTERN PyObject *_wrap_ClusteringParameters_int_centroids_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18862 PyObject *resultobj = 0;
18866 PyObject * obj0 = 0 ;
18869 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_int_centroids_get",&obj0)) SWIG_fail;
18870 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18871 if (!SWIG_IsOK(res1)) {
18872 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_int_centroids_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18875 result = (bool) ((arg1)->int_centroids);
18876 resultobj = SWIG_From_bool(static_cast< bool >(result));
18883 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18884 PyObject *resultobj = 0;
18891 PyObject * obj0 = 0 ;
18892 PyObject * obj1 = 0 ;
18894 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_update_index_set",&obj0,&obj1)) SWIG_fail;
18895 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18896 if (!SWIG_IsOK(res1)) {
18897 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_update_index_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18900 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18901 if (!SWIG_IsOK(ecode2)) {
18902 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_update_index_set" "', argument " "2"" of type '" "bool""'");
18904 arg2 =
static_cast< bool >(val2);
18905 if (arg1) (arg1)->update_index = arg2;
18906 resultobj = SWIG_Py_Void();
18913 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18914 PyObject *resultobj = 0;
18918 PyObject * obj0 = 0 ;
18921 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_update_index_get",&obj0)) SWIG_fail;
18922 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18923 if (!SWIG_IsOK(res1)) {
18924 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_update_index_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18927 result = (bool) ((arg1)->update_index);
18928 resultobj = SWIG_From_bool(static_cast< bool >(result));
18935 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18936 PyObject *resultobj = 0;
18943 PyObject * obj0 = 0 ;
18944 PyObject * obj1 = 0 ;
18946 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_frozen_centroids_set",&obj0,&obj1)) SWIG_fail;
18947 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18948 if (!SWIG_IsOK(res1)) {
18949 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18952 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18953 if (!SWIG_IsOK(ecode2)) {
18954 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "2"" of type '" "bool""'");
18956 arg2 =
static_cast< bool >(val2);
18957 if (arg1) (arg1)->frozen_centroids = arg2;
18958 resultobj = SWIG_Py_Void();
18965 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18966 PyObject *resultobj = 0;
18970 PyObject * obj0 = 0 ;
18973 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_frozen_centroids_get",&obj0)) SWIG_fail;
18974 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18975 if (!SWIG_IsOK(res1)) {
18976 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_frozen_centroids_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18979 result = (bool) ((arg1)->frozen_centroids);
18980 resultobj = SWIG_From_bool(static_cast< bool >(result));
18987 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
18988 PyObject *resultobj = 0;
18995 PyObject * obj0 = 0 ;
18996 PyObject * obj1 = 0 ;
18998 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_min_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
18999 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19000 if (!SWIG_IsOK(res1)) {
19001 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19004 ecode2 = SWIG_AsVal_int(obj1, &val2);
19005 if (!SWIG_IsOK(ecode2)) {
19006 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
19008 arg2 =
static_cast< int >(val2);
19009 if (arg1) (arg1)->min_points_per_centroid = arg2;
19010 resultobj = SWIG_Py_Void();
19017 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19018 PyObject *resultobj = 0;
19022 PyObject * obj0 = 0 ;
19025 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_min_points_per_centroid_get",&obj0)) SWIG_fail;
19026 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19027 if (!SWIG_IsOK(res1)) {
19028 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_min_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19031 result = (int) ((arg1)->min_points_per_centroid);
19032 resultobj = SWIG_From_int(static_cast< int >(result));
19039 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19040 PyObject *resultobj = 0;
19047 PyObject * obj0 = 0 ;
19048 PyObject * obj1 = 0 ;
19050 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_max_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
19051 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19052 if (!SWIG_IsOK(res1)) {
19053 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19056 ecode2 = SWIG_AsVal_int(obj1, &val2);
19057 if (!SWIG_IsOK(ecode2)) {
19058 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
19060 arg2 =
static_cast< int >(val2);
19061 if (arg1) (arg1)->max_points_per_centroid = arg2;
19062 resultobj = SWIG_Py_Void();
19069 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19070 PyObject *resultobj = 0;
19074 PyObject * obj0 = 0 ;
19077 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_max_points_per_centroid_get",&obj0)) SWIG_fail;
19078 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19079 if (!SWIG_IsOK(res1)) {
19080 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_max_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19083 result = (int) ((arg1)->max_points_per_centroid);
19084 resultobj = SWIG_From_int(static_cast< int >(result));
19091 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19092 PyObject *resultobj = 0;
19099 PyObject * obj0 = 0 ;
19100 PyObject * obj1 = 0 ;
19102 if (!PyArg_ParseTuple(args,(
char *)
"OO:ClusteringParameters_seed_set",&obj0,&obj1)) SWIG_fail;
19103 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19104 if (!SWIG_IsOK(res1)) {
19105 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_seed_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19108 ecode2 = SWIG_AsVal_int(obj1, &val2);
19109 if (!SWIG_IsOK(ecode2)) {
19110 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ClusteringParameters_seed_set" "', argument " "2"" of type '" "int""'");
19112 arg2 =
static_cast< int >(val2);
19113 if (arg1) (arg1)->seed = arg2;
19114 resultobj = SWIG_Py_Void();
19121 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19122 PyObject *resultobj = 0;
19126 PyObject * obj0 = 0 ;
19129 if (!PyArg_ParseTuple(args,(
char *)
"O:ClusteringParameters_seed_get",&obj0)) SWIG_fail;
19130 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19131 if (!SWIG_IsOK(res1)) {
19132 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ClusteringParameters_seed_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19135 result = (int) ((arg1)->seed);
19136 resultobj = SWIG_From_int(static_cast< int >(result));
19143 SWIGINTERN PyObject *_wrap_new_ClusteringParameters(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19144 PyObject *resultobj = 0;
19147 if (!PyArg_ParseTuple(args,(
char *)
":new_ClusteringParameters")) SWIG_fail;
19149 Py_BEGIN_ALLOW_THREADS
19153 PyEval_RestoreThread(_save);
19155 if (PyErr_Occurred()) {
19158 PyErr_SetString(PyExc_RuntimeError, e.
what());
19162 Py_END_ALLOW_THREADS
19164 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_NEW | 0 );
19171 SWIGINTERN PyObject *_wrap_delete_ClusteringParameters(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19172 PyObject *resultobj = 0;
19176 PyObject * obj0 = 0 ;
19178 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_ClusteringParameters",&obj0)) SWIG_fail;
19179 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_DISOWN | 0 );
19180 if (!SWIG_IsOK(res1)) {
19181 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_ClusteringParameters" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19185 resultobj = SWIG_Py_Void();
19192 SWIGINTERN PyObject *ClusteringParameters_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19194 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
19195 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ClusteringParameters, SWIG_NewClientData(obj));
19196 return SWIG_Py_Void();
19199 SWIGINTERN PyObject *_wrap_Clustering_d_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19200 PyObject *resultobj = 0;
19207 PyObject * obj0 = 0 ;
19208 PyObject * obj1 = 0 ;
19210 if (!PyArg_ParseTuple(args,(
char *)
"OO:Clustering_d_set",&obj0,&obj1)) SWIG_fail;
19211 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19212 if (!SWIG_IsOK(res1)) {
19213 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_d_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19216 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19217 if (!SWIG_IsOK(ecode2)) {
19218 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Clustering_d_set" "', argument " "2"" of type '" "size_t""'");
19220 arg2 =
static_cast< size_t >(val2);
19221 if (arg1) (arg1)->d = arg2;
19222 resultobj = SWIG_Py_Void();
19229 SWIGINTERN PyObject *_wrap_Clustering_d_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19230 PyObject *resultobj = 0;
19234 PyObject * obj0 = 0 ;
19237 if (!PyArg_ParseTuple(args,(
char *)
"O:Clustering_d_get",&obj0)) SWIG_fail;
19238 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19239 if (!SWIG_IsOK(res1)) {
19240 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_d_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19243 result = (size_t) ((arg1)->d);
19244 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19251 SWIGINTERN PyObject *_wrap_Clustering_k_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19252 PyObject *resultobj = 0;
19259 PyObject * obj0 = 0 ;
19260 PyObject * obj1 = 0 ;
19262 if (!PyArg_ParseTuple(args,(
char *)
"OO:Clustering_k_set",&obj0,&obj1)) SWIG_fail;
19263 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19264 if (!SWIG_IsOK(res1)) {
19265 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_k_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19268 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19269 if (!SWIG_IsOK(ecode2)) {
19270 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Clustering_k_set" "', argument " "2"" of type '" "size_t""'");
19272 arg2 =
static_cast< size_t >(val2);
19273 if (arg1) (arg1)->k = arg2;
19274 resultobj = SWIG_Py_Void();
19281 SWIGINTERN PyObject *_wrap_Clustering_k_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19282 PyObject *resultobj = 0;
19286 PyObject * obj0 = 0 ;
19289 if (!PyArg_ParseTuple(args,(
char *)
"O:Clustering_k_get",&obj0)) SWIG_fail;
19290 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19291 if (!SWIG_IsOK(res1)) {
19292 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_k_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19295 result = (size_t) ((arg1)->k);
19296 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19303 SWIGINTERN PyObject *_wrap_Clustering_centroids_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19304 PyObject *resultobj = 0;
19306 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
19311 PyObject * obj0 = 0 ;
19312 PyObject * obj1 = 0 ;
19314 if (!PyArg_ParseTuple(args,(
char *)
"OO:Clustering_centroids_set",&obj0,&obj1)) SWIG_fail;
19315 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19316 if (!SWIG_IsOK(res1)) {
19317 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_centroids_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19320 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19321 if (!SWIG_IsOK(res2)) {
19322 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "Clustering_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
19324 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
19325 if (arg1) (arg1)->centroids = *arg2;
19326 resultobj = SWIG_Py_Void();
19333 SWIGINTERN PyObject *_wrap_Clustering_centroids_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19334 PyObject *resultobj = 0;
19338 PyObject * obj0 = 0 ;
19339 std::vector< float > *result = 0 ;
19341 if (!PyArg_ParseTuple(args,(
char *)
"O:Clustering_centroids_get",&obj0)) SWIG_fail;
19342 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19343 if (!SWIG_IsOK(res1)) {
19344 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_centroids_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19347 result = (std::vector< float > *)& ((arg1)->centroids);
19348 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19355 SWIGINTERN PyObject *_wrap_Clustering_obj_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19356 PyObject *resultobj = 0;
19358 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
19363 PyObject * obj0 = 0 ;
19364 PyObject * obj1 = 0 ;
19366 if (!PyArg_ParseTuple(args,(
char *)
"OO:Clustering_obj_set",&obj0,&obj1)) SWIG_fail;
19367 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19368 if (!SWIG_IsOK(res1)) {
19369 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_obj_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19372 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19373 if (!SWIG_IsOK(res2)) {
19374 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "Clustering_obj_set" "', argument " "2"" of type '" "std::vector< float > *""'");
19376 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
19377 if (arg1) (arg1)->obj = *arg2;
19378 resultobj = SWIG_Py_Void();
19385 SWIGINTERN PyObject *_wrap_Clustering_obj_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19386 PyObject *resultobj = 0;
19390 PyObject * obj0 = 0 ;
19391 std::vector< float > *result = 0 ;
19393 if (!PyArg_ParseTuple(args,(
char *)
"O:Clustering_obj_get",&obj0)) SWIG_fail;
19394 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19395 if (!SWIG_IsOK(res1)) {
19396 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_obj_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19399 result = (std::vector< float > *)& ((arg1)->obj);
19400 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19407 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19408 PyObject *resultobj = 0;
19415 PyObject * obj0 = 0 ;
19416 PyObject * obj1 = 0 ;
19419 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_Clustering",&obj0,&obj1)) SWIG_fail;
19420 ecode1 = SWIG_AsVal_int(obj0, &val1);
19421 if (!SWIG_IsOK(ecode1)) {
19422 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
19424 arg1 =
static_cast< int >(val1);
19425 ecode2 = SWIG_AsVal_int(obj1, &val2);
19426 if (!SWIG_IsOK(ecode2)) {
19427 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
19429 arg2 =
static_cast< int >(val2);
19431 Py_BEGIN_ALLOW_THREADS
19435 PyEval_RestoreThread(_save);
19437 if (PyErr_Occurred()) {
19440 PyErr_SetString(PyExc_RuntimeError, e.
what());
19444 Py_END_ALLOW_THREADS
19446 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
19453 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19454 PyObject *resultobj = 0;
19464 PyObject * obj0 = 0 ;
19465 PyObject * obj1 = 0 ;
19466 PyObject * obj2 = 0 ;
19469 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_Clustering",&obj0,&obj1,&obj2)) SWIG_fail;
19470 ecode1 = SWIG_AsVal_int(obj0, &val1);
19471 if (!SWIG_IsOK(ecode1)) {
19472 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
19474 arg1 =
static_cast< int >(val1);
19475 ecode2 = SWIG_AsVal_int(obj1, &val2);
19476 if (!SWIG_IsOK(ecode2)) {
19477 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
19479 arg2 =
static_cast< int >(val2);
19480 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0);
19481 if (!SWIG_IsOK(res3)) {
19482 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
19485 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
19489 Py_BEGIN_ALLOW_THREADS
19493 PyEval_RestoreThread(_save);
19495 if (PyErr_Occurred()) {
19498 PyErr_SetString(PyExc_RuntimeError, e.
what());
19502 Py_END_ALLOW_THREADS
19504 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
19511 SWIGINTERN PyObject *_wrap_new_Clustering(PyObject *
self, PyObject *args) {
19513 PyObject *argv[4] = {
19518 if (!PyTuple_Check(args)) SWIG_fail;
19519 argc = args ? PyObject_Length(args) : 0;
19520 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
19521 argv[ii] = PyTuple_GET_ITEM(args,ii);
19526 int res = SWIG_AsVal_int(argv[0], NULL);
19527 _v = SWIG_CheckState(res);
19531 int res = SWIG_AsVal_int(argv[1], NULL);
19532 _v = SWIG_CheckState(res);
19535 return _wrap_new_Clustering__SWIG_0(
self, args);
19542 int res = SWIG_AsVal_int(argv[0], NULL);
19543 _v = SWIG_CheckState(res);
19547 int res = SWIG_AsVal_int(argv[1], NULL);
19548 _v = SWIG_CheckState(res);
19551 int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__ClusteringParameters, 0);
19552 _v = SWIG_CheckState(res);
19554 return _wrap_new_Clustering__SWIG_1(
self, args);
19561 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_Clustering'.\n"
19562 " Possible C/C++ prototypes are:\n"
19563 " faiss::Clustering::Clustering(int,int)\n"
19564 " faiss::Clustering::Clustering(int,int,faiss::ClusteringParameters const &)\n");
19569 SWIGINTERN PyObject *_wrap_Clustering_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19570 PyObject *resultobj = 0;
19572 faiss::Clustering::idx_t arg2 ;
19573 float *arg3 = (
float *) 0 ;
19583 PyObject * obj0 = 0 ;
19584 PyObject * obj1 = 0 ;
19585 PyObject * obj2 = 0 ;
19586 PyObject * obj3 = 0 ;
19588 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:Clustering_train",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
19589 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19590 if (!SWIG_IsOK(res1)) {
19591 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_train" "', argument " "1"" of type '" "faiss::Clustering *""'");
19594 ecode2 = SWIG_AsVal_long(obj1, &val2);
19595 if (!SWIG_IsOK(ecode2)) {
19596 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "Clustering_train" "', argument " "2"" of type '" "faiss::Clustering::idx_t""'");
19598 arg2 =
static_cast< faiss::Clustering::idx_t
>(val2);
19599 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
19600 if (!SWIG_IsOK(res3)) {
19601 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "Clustering_train" "', argument " "3"" of type '" "float const *""'");
19603 arg3 =
reinterpret_cast< float *
>(argp3);
19604 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_faiss__Index, 0 );
19605 if (!SWIG_IsOK(res4)) {
19606 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
19609 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
19613 Py_BEGIN_ALLOW_THREADS
19615 (arg1)->train(arg2,(
float const *)arg3,*arg4);
19617 PyEval_RestoreThread(_save);
19619 if (PyErr_Occurred()) {
19622 PyErr_SetString(PyExc_RuntimeError, e.
what());
19626 Py_END_ALLOW_THREADS
19628 resultobj = SWIG_Py_Void();
19635 SWIGINTERN PyObject *_wrap_Clustering_post_process_centroids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19636 PyObject *resultobj = 0;
19640 PyObject * obj0 = 0 ;
19642 if (!PyArg_ParseTuple(args,(
char *)
"O:Clustering_post_process_centroids",&obj0)) SWIG_fail;
19643 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19644 if (!SWIG_IsOK(res1)) {
19645 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "Clustering_post_process_centroids" "', argument " "1"" of type '" "faiss::Clustering *""'");
19649 Py_BEGIN_ALLOW_THREADS
19651 (arg1)->post_process_centroids();
19653 PyEval_RestoreThread(_save);
19655 if (PyErr_Occurred()) {
19658 PyErr_SetString(PyExc_RuntimeError, e.
what());
19662 Py_END_ALLOW_THREADS
19664 resultobj = SWIG_Py_Void();
19671 SWIGINTERN PyObject *_wrap_delete_Clustering(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19672 PyObject *resultobj = 0;
19676 PyObject * obj0 = 0 ;
19678 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_Clustering",&obj0)) SWIG_fail;
19679 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_DISOWN | 0 );
19680 if (!SWIG_IsOK(res1)) {
19681 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_Clustering" "', argument " "1"" of type '" "faiss::Clustering *""'");
19685 Py_BEGIN_ALLOW_THREADS
19689 PyEval_RestoreThread(_save);
19691 if (PyErr_Occurred()) {
19694 PyErr_SetString(PyExc_RuntimeError, e.
what());
19698 Py_END_ALLOW_THREADS
19700 resultobj = SWIG_Py_Void();
19707 SWIGINTERN PyObject *Clustering_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19709 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
19710 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Clustering, SWIG_NewClientData(obj));
19711 return SWIG_Py_Void();
19714 SWIGINTERN PyObject *_wrap_kmeans_clustering(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19715 PyObject *resultobj = 0;
19719 float *arg4 = (
float *) 0 ;
19720 float *arg5 = (
float *) 0 ;
19731 PyObject * obj0 = 0 ;
19732 PyObject * obj1 = 0 ;
19733 PyObject * obj2 = 0 ;
19734 PyObject * obj3 = 0 ;
19735 PyObject * obj4 = 0 ;
19738 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:kmeans_clustering",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
19739 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
19740 if (!SWIG_IsOK(ecode1)) {
19741 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "kmeans_clustering" "', argument " "1"" of type '" "size_t""'");
19743 arg1 =
static_cast< size_t >(val1);
19744 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19745 if (!SWIG_IsOK(ecode2)) {
19746 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "kmeans_clustering" "', argument " "2"" of type '" "size_t""'");
19748 arg2 =
static_cast< size_t >(val2);
19749 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
19750 if (!SWIG_IsOK(ecode3)) {
19751 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "kmeans_clustering" "', argument " "3"" of type '" "size_t""'");
19753 arg3 =
static_cast< size_t >(val3);
19754 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
19755 if (!SWIG_IsOK(res4)) {
19756 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "kmeans_clustering" "', argument " "4"" of type '" "float const *""'");
19758 arg4 =
reinterpret_cast< float *
>(argp4);
19759 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
19760 if (!SWIG_IsOK(res5)) {
19761 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "kmeans_clustering" "', argument " "5"" of type '" "float *""'");
19763 arg5 =
reinterpret_cast< float *
>(argp5);
19765 Py_BEGIN_ALLOW_THREADS
19769 PyEval_RestoreThread(_save);
19771 if (PyErr_Occurred()) {
19774 PyErr_SetString(PyExc_RuntimeError, e.
what());
19778 Py_END_ALLOW_THREADS
19780 resultobj = SWIG_From_float(static_cast< float >(result));
19787 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19788 PyObject *resultobj = 0;
19795 PyObject * obj0 = 0 ;
19796 PyObject * obj1 = 0 ;
19798 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_d_set",&obj0,&obj1)) SWIG_fail;
19799 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19800 if (!SWIG_IsOK(res1)) {
19801 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_d_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19804 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19805 if (!SWIG_IsOK(ecode2)) {
19806 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_d_set" "', argument " "2"" of type '" "size_t""'");
19808 arg2 =
static_cast< size_t >(val2);
19809 if (arg1) (arg1)->d = arg2;
19810 resultobj = SWIG_Py_Void();
19817 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19818 PyObject *resultobj = 0;
19822 PyObject * obj0 = 0 ;
19825 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_d_get",&obj0)) SWIG_fail;
19826 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19827 if (!SWIG_IsOK(res1)) {
19828 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_d_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19831 result = (size_t) ((arg1)->d);
19832 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19839 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19840 PyObject *resultobj = 0;
19847 PyObject * obj0 = 0 ;
19848 PyObject * obj1 = 0 ;
19850 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_M_set",&obj0,&obj1)) SWIG_fail;
19851 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19852 if (!SWIG_IsOK(res1)) {
19853 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_M_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19856 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19857 if (!SWIG_IsOK(ecode2)) {
19858 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_M_set" "', argument " "2"" of type '" "size_t""'");
19860 arg2 =
static_cast< size_t >(val2);
19861 if (arg1) (arg1)->M = arg2;
19862 resultobj = SWIG_Py_Void();
19869 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19870 PyObject *resultobj = 0;
19874 PyObject * obj0 = 0 ;
19877 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_M_get",&obj0)) SWIG_fail;
19878 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19879 if (!SWIG_IsOK(res1)) {
19880 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_M_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19883 result = (size_t) ((arg1)->M);
19884 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19891 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19892 PyObject *resultobj = 0;
19899 PyObject * obj0 = 0 ;
19900 PyObject * obj1 = 0 ;
19902 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_nbits_set",&obj0,&obj1)) SWIG_fail;
19903 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19904 if (!SWIG_IsOK(res1)) {
19905 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_nbits_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19908 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19909 if (!SWIG_IsOK(ecode2)) {
19910 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_nbits_set" "', argument " "2"" of type '" "size_t""'");
19912 arg2 =
static_cast< size_t >(val2);
19913 if (arg1) (arg1)->nbits = arg2;
19914 resultobj = SWIG_Py_Void();
19921 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19922 PyObject *resultobj = 0;
19926 PyObject * obj0 = 0 ;
19929 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_nbits_get",&obj0)) SWIG_fail;
19930 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19931 if (!SWIG_IsOK(res1)) {
19932 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_nbits_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19935 result = (size_t) ((arg1)->nbits);
19936 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19943 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19944 PyObject *resultobj = 0;
19951 PyObject * obj0 = 0 ;
19952 PyObject * obj1 = 0 ;
19954 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_dsub_set",&obj0,&obj1)) SWIG_fail;
19955 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19956 if (!SWIG_IsOK(res1)) {
19957 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_dsub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19960 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19961 if (!SWIG_IsOK(ecode2)) {
19962 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_dsub_set" "', argument " "2"" of type '" "size_t""'");
19964 arg2 =
static_cast< size_t >(val2);
19965 if (arg1) (arg1)->dsub = arg2;
19966 resultobj = SWIG_Py_Void();
19973 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19974 PyObject *resultobj = 0;
19978 PyObject * obj0 = 0 ;
19981 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_dsub_get",&obj0)) SWIG_fail;
19982 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19983 if (!SWIG_IsOK(res1)) {
19984 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_dsub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19987 result = (size_t) ((arg1)->dsub);
19988 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19995 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
19996 PyObject *resultobj = 0;
20003 PyObject * obj0 = 0 ;
20004 PyObject * obj1 = 0 ;
20006 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_byte_per_idx_set",&obj0,&obj1)) SWIG_fail;
20007 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20008 if (!SWIG_IsOK(res1)) {
20009 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20012 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20013 if (!SWIG_IsOK(ecode2)) {
20014 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "2"" of type '" "size_t""'");
20016 arg2 =
static_cast< size_t >(val2);
20017 if (arg1) (arg1)->byte_per_idx = arg2;
20018 resultobj = SWIG_Py_Void();
20025 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20026 PyObject *resultobj = 0;
20030 PyObject * obj0 = 0 ;
20033 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_byte_per_idx_get",&obj0)) SWIG_fail;
20034 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20035 if (!SWIG_IsOK(res1)) {
20036 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_byte_per_idx_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20039 result = (size_t) ((arg1)->byte_per_idx);
20040 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20047 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20048 PyObject *resultobj = 0;
20055 PyObject * obj0 = 0 ;
20056 PyObject * obj1 = 0 ;
20058 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
20059 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20060 if (!SWIG_IsOK(res1)) {
20061 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20064 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20065 if (!SWIG_IsOK(ecode2)) {
20066 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
20068 arg2 =
static_cast< size_t >(val2);
20069 if (arg1) (arg1)->code_size = arg2;
20070 resultobj = SWIG_Py_Void();
20077 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20078 PyObject *resultobj = 0;
20082 PyObject * obj0 = 0 ;
20085 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_code_size_get",&obj0)) SWIG_fail;
20086 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20087 if (!SWIG_IsOK(res1)) {
20088 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20091 result = (size_t) ((arg1)->code_size);
20092 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20099 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20100 PyObject *resultobj = 0;
20107 PyObject * obj0 = 0 ;
20108 PyObject * obj1 = 0 ;
20110 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_ksub_set",&obj0,&obj1)) SWIG_fail;
20111 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20112 if (!SWIG_IsOK(res1)) {
20113 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_ksub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20116 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20117 if (!SWIG_IsOK(ecode2)) {
20118 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_ksub_set" "', argument " "2"" of type '" "size_t""'");
20120 arg2 =
static_cast< size_t >(val2);
20121 if (arg1) (arg1)->ksub = arg2;
20122 resultobj = SWIG_Py_Void();
20129 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20130 PyObject *resultobj = 0;
20134 PyObject * obj0 = 0 ;
20137 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_ksub_get",&obj0)) SWIG_fail;
20138 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20139 if (!SWIG_IsOK(res1)) {
20140 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_ksub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20143 result = (size_t) ((arg1)->ksub);
20144 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20151 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20152 PyObject *resultobj = 0;
20159 PyObject * obj0 = 0 ;
20160 PyObject * obj1 = 0 ;
20162 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_verbose_set",&obj0,&obj1)) SWIG_fail;
20163 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20164 if (!SWIG_IsOK(res1)) {
20165 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_verbose_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20168 ecode2 = SWIG_AsVal_bool(obj1, &val2);
20169 if (!SWIG_IsOK(ecode2)) {
20170 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_verbose_set" "', argument " "2"" of type '" "bool""'");
20172 arg2 =
static_cast< bool >(val2);
20173 if (arg1) (arg1)->verbose = arg2;
20174 resultobj = SWIG_Py_Void();
20181 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20182 PyObject *resultobj = 0;
20186 PyObject * obj0 = 0 ;
20189 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_verbose_get",&obj0)) SWIG_fail;
20190 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20191 if (!SWIG_IsOK(res1)) {
20192 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_verbose_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20195 result = (bool) ((arg1)->verbose);
20196 resultobj = SWIG_From_bool(static_cast< bool >(result));
20203 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20204 PyObject *resultobj = 0;
20211 PyObject * obj0 = 0 ;
20212 PyObject * obj1 = 0 ;
20214 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_train_type_set",&obj0,&obj1)) SWIG_fail;
20215 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20216 if (!SWIG_IsOK(res1)) {
20217 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_train_type_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20220 ecode2 = SWIG_AsVal_int(obj1, &val2);
20221 if (!SWIG_IsOK(ecode2)) {
20222 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_train_type_set" "', argument " "2"" of type '" "faiss::ProductQuantizer::train_type_t""'");
20225 if (arg1) (arg1)->train_type = arg2;
20226 resultobj = SWIG_Py_Void();
20233 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20234 PyObject *resultobj = 0;
20238 PyObject * obj0 = 0 ;
20241 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_train_type_get",&obj0)) SWIG_fail;
20242 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20243 if (!SWIG_IsOK(res1)) {
20244 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_train_type_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20248 resultobj = SWIG_From_int(static_cast< int >(result));
20255 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20256 PyObject *resultobj = 0;
20263 PyObject * obj0 = 0 ;
20264 PyObject * obj1 = 0 ;
20266 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_cp_set",&obj0,&obj1)) SWIG_fail;
20267 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20268 if (!SWIG_IsOK(res1)) {
20269 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_cp_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20272 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
20273 if (!SWIG_IsOK(res2)) {
20274 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
20277 if (arg1) (arg1)->cp = *arg2;
20278 resultobj = SWIG_Py_Void();
20285 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20286 PyObject *resultobj = 0;
20290 PyObject * obj0 = 0 ;
20293 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_cp_get",&obj0)) SWIG_fail;
20294 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20295 if (!SWIG_IsOK(res1)) {
20296 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_cp_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20300 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
20307 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20308 PyObject *resultobj = 0;
20315 PyObject * obj0 = 0 ;
20316 PyObject * obj1 = 0 ;
20318 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_assign_index_set",&obj0,&obj1)) SWIG_fail;
20319 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20320 if (!SWIG_IsOK(res1)) {
20321 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_assign_index_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20324 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
20325 if (!SWIG_IsOK(res2)) {
20326 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_assign_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
20329 if (arg1) (arg1)->assign_index = arg2;
20330 resultobj = SWIG_Py_Void();
20337 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20338 PyObject *resultobj = 0;
20342 PyObject * obj0 = 0 ;
20345 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_assign_index_get",&obj0)) SWIG_fail;
20346 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20347 if (!SWIG_IsOK(res1)) {
20348 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_assign_index_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20352 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
20359 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20360 PyObject *resultobj = 0;
20362 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
20367 PyObject * obj0 = 0 ;
20368 PyObject * obj1 = 0 ;
20370 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_centroids_set",&obj0,&obj1)) SWIG_fail;
20371 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20372 if (!SWIG_IsOK(res1)) {
20373 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_centroids_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20376 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20377 if (!SWIG_IsOK(res2)) {
20378 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
20380 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
20381 if (arg1) (arg1)->centroids = *arg2;
20382 resultobj = SWIG_Py_Void();
20389 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20390 PyObject *resultobj = 0;
20394 PyObject * obj0 = 0 ;
20395 std::vector< float > *result = 0 ;
20397 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_centroids_get",&obj0)) SWIG_fail;
20398 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20399 if (!SWIG_IsOK(res1)) {
20400 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_centroids_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20403 result = (std::vector< float > *)& ((arg1)->centroids);
20404 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20411 SWIGINTERN PyObject *_wrap_ProductQuantizer_get_centroids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20412 PyObject *resultobj = 0;
20422 PyObject * obj0 = 0 ;
20423 PyObject * obj1 = 0 ;
20424 PyObject * obj2 = 0 ;
20425 float *result = 0 ;
20427 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_get_centroids",&obj0,&obj1,&obj2)) SWIG_fail;
20428 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20429 if (!SWIG_IsOK(res1)) {
20430 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_get_centroids" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20433 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20434 if (!SWIG_IsOK(ecode2)) {
20435 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_get_centroids" "', argument " "2"" of type '" "size_t""'");
20437 arg2 =
static_cast< size_t >(val2);
20438 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20439 if (!SWIG_IsOK(ecode3)) {
20440 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_get_centroids" "', argument " "3"" of type '" "size_t""'");
20442 arg3 =
static_cast< size_t >(val3);
20444 Py_BEGIN_ALLOW_THREADS
20446 result = (
float *)(arg1)->get_centroids(arg2,arg3);
20448 PyEval_RestoreThread(_save);
20450 if (PyErr_Occurred()) {
20453 PyErr_SetString(PyExc_RuntimeError, e.
what());
20457 Py_END_ALLOW_THREADS
20459 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
20466 SWIGINTERN PyObject *_wrap_ProductQuantizer_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20467 PyObject *resultobj = 0;
20470 float *arg3 = (
float *) 0 ;
20477 PyObject * obj0 = 0 ;
20478 PyObject * obj1 = 0 ;
20479 PyObject * obj2 = 0 ;
20481 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
20482 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20483 if (!SWIG_IsOK(res1)) {
20484 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_train" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20487 ecode2 = SWIG_AsVal_int(obj1, &val2);
20488 if (!SWIG_IsOK(ecode2)) {
20489 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_train" "', argument " "2"" of type '" "int""'");
20491 arg2 =
static_cast< int >(val2);
20492 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20493 if (!SWIG_IsOK(res3)) {
20494 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_train" "', argument " "3"" of type '" "float const *""'");
20496 arg3 =
reinterpret_cast< float *
>(argp3);
20498 Py_BEGIN_ALLOW_THREADS
20500 (arg1)->train(arg2,(
float const *)arg3);
20502 PyEval_RestoreThread(_save);
20504 if (PyErr_Occurred()) {
20507 PyErr_SetString(PyExc_RuntimeError, e.
what());
20511 Py_END_ALLOW_THREADS
20513 resultobj = SWIG_Py_Void();
20520 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20521 PyObject *resultobj = 0;
20531 PyObject * obj0 = 0 ;
20532 PyObject * obj1 = 0 ;
20533 PyObject * obj2 = 0 ;
20536 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_ProductQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
20537 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
20538 if (!SWIG_IsOK(ecode1)) {
20539 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_ProductQuantizer" "', argument " "1"" of type '" "size_t""'");
20541 arg1 =
static_cast< size_t >(val1);
20542 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20543 if (!SWIG_IsOK(ecode2)) {
20544 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_ProductQuantizer" "', argument " "2"" of type '" "size_t""'");
20546 arg2 =
static_cast< size_t >(val2);
20547 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20548 if (!SWIG_IsOK(ecode3)) {
20549 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_ProductQuantizer" "', argument " "3"" of type '" "size_t""'");
20551 arg3 =
static_cast< size_t >(val3);
20553 Py_BEGIN_ALLOW_THREADS
20557 PyEval_RestoreThread(_save);
20559 if (PyErr_Occurred()) {
20562 PyErr_SetString(PyExc_RuntimeError, e.
what());
20566 Py_END_ALLOW_THREADS
20568 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
20575 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20576 PyObject *resultobj = 0;
20579 if (!PyArg_ParseTuple(args,(
char *)
":new_ProductQuantizer")) SWIG_fail;
20581 Py_BEGIN_ALLOW_THREADS
20585 PyEval_RestoreThread(_save);
20587 if (PyErr_Occurred()) {
20590 PyErr_SetString(PyExc_RuntimeError, e.
what());
20594 Py_END_ALLOW_THREADS
20596 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
20603 SWIGINTERN PyObject *_wrap_new_ProductQuantizer(PyObject *
self, PyObject *args) {
20605 PyObject *argv[4] = {
20610 if (!PyTuple_Check(args)) SWIG_fail;
20611 argc = args ? PyObject_Length(args) : 0;
20612 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
20613 argv[ii] = PyTuple_GET_ITEM(args,ii);
20616 return _wrap_new_ProductQuantizer__SWIG_1(
self, args);
20621 int res = SWIG_AsVal_size_t(argv[0], NULL);
20622 _v = SWIG_CheckState(res);
20626 int res = SWIG_AsVal_size_t(argv[1], NULL);
20627 _v = SWIG_CheckState(res);
20631 int res = SWIG_AsVal_size_t(argv[2], NULL);
20632 _v = SWIG_CheckState(res);
20635 return _wrap_new_ProductQuantizer__SWIG_0(
self, args);
20642 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_ProductQuantizer'.\n"
20643 " Possible C/C++ prototypes are:\n"
20644 " faiss::ProductQuantizer::ProductQuantizer(size_t,size_t,size_t)\n"
20645 " faiss::ProductQuantizer::ProductQuantizer()\n");
20650 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_derived_values(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20651 PyObject *resultobj = 0;
20655 PyObject * obj0 = 0 ;
20657 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_set_derived_values",&obj0)) SWIG_fail;
20658 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20659 if (!SWIG_IsOK(res1)) {
20660 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_set_derived_values" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20664 Py_BEGIN_ALLOW_THREADS
20666 (arg1)->set_derived_values();
20668 PyEval_RestoreThread(_save);
20670 if (PyErr_Occurred()) {
20673 PyErr_SetString(PyExc_RuntimeError, e.
what());
20677 Py_END_ALLOW_THREADS
20679 resultobj = SWIG_Py_Void();
20686 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_params(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20687 PyObject *resultobj = 0;
20689 float *arg2 = (
float *) 0 ;
20697 PyObject * obj0 = 0 ;
20698 PyObject * obj1 = 0 ;
20699 PyObject * obj2 = 0 ;
20701 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_set_params",&obj0,&obj1,&obj2)) SWIG_fail;
20702 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20703 if (!SWIG_IsOK(res1)) {
20704 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_set_params" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20707 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20708 if (!SWIG_IsOK(res2)) {
20709 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_set_params" "', argument " "2"" of type '" "float const *""'");
20711 arg2 =
reinterpret_cast< float *
>(argp2);
20712 ecode3 = SWIG_AsVal_int(obj2, &val3);
20713 if (!SWIG_IsOK(ecode3)) {
20714 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_set_params" "', argument " "3"" of type '" "int""'");
20716 arg3 =
static_cast< int >(val3);
20718 Py_BEGIN_ALLOW_THREADS
20720 (arg1)->set_params((
float const *)arg2,arg3);
20722 PyEval_RestoreThread(_save);
20724 if (PyErr_Occurred()) {
20727 PyErr_SetString(PyExc_RuntimeError, e.
what());
20731 Py_END_ALLOW_THREADS
20733 resultobj = SWIG_Py_Void();
20740 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20741 PyObject *resultobj = 0;
20743 float *arg2 = (
float *) 0 ;
20744 uint8_t *arg3 = (uint8_t *) 0 ;
20751 PyObject * obj0 = 0 ;
20752 PyObject * obj1 = 0 ;
20753 PyObject * obj2 = 0 ;
20755 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_compute_code",&obj0,&obj1,&obj2)) SWIG_fail;
20756 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20757 if (!SWIG_IsOK(res1)) {
20758 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_code" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20761 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20762 if (!SWIG_IsOK(res2)) {
20763 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_code" "', argument " "2"" of type '" "float const *""'");
20765 arg2 =
reinterpret_cast< float *
>(argp2);
20766 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
20767 if (!SWIG_IsOK(res3)) {
20768 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_code" "', argument " "3"" of type '" "uint8_t *""'");
20770 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
20772 Py_BEGIN_ALLOW_THREADS
20776 PyEval_RestoreThread(_save);
20778 if (PyErr_Occurred()) {
20781 PyErr_SetString(PyExc_RuntimeError, e.
what());
20785 Py_END_ALLOW_THREADS
20787 resultobj = SWIG_Py_Void();
20794 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_codes(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20795 PyObject *resultobj = 0;
20797 float *arg2 = (
float *) 0 ;
20798 uint8_t *arg3 = (uint8_t *) 0 ;
20808 PyObject * obj0 = 0 ;
20809 PyObject * obj1 = 0 ;
20810 PyObject * obj2 = 0 ;
20811 PyObject * obj3 = 0 ;
20813 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ProductQuantizer_compute_codes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20814 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20815 if (!SWIG_IsOK(res1)) {
20816 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_codes" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20819 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20820 if (!SWIG_IsOK(res2)) {
20821 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_codes" "', argument " "2"" of type '" "float const *""'");
20823 arg2 =
reinterpret_cast< float *
>(argp2);
20824 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
20825 if (!SWIG_IsOK(res3)) {
20826 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_codes" "', argument " "3"" of type '" "uint8_t *""'");
20828 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
20829 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
20830 if (!SWIG_IsOK(ecode4)) {
20831 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "ProductQuantizer_compute_codes" "', argument " "4"" of type '" "size_t""'");
20833 arg4 =
static_cast< size_t >(val4);
20835 Py_BEGIN_ALLOW_THREADS
20839 PyEval_RestoreThread(_save);
20841 if (PyErr_Occurred()) {
20844 PyErr_SetString(PyExc_RuntimeError, e.
what());
20848 Py_END_ALLOW_THREADS
20850 resultobj = SWIG_Py_Void();
20857 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_codes_with_assign_index(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20858 PyObject *resultobj = 0;
20860 float *arg2 = (
float *) 0 ;
20861 uint8_t *arg3 = (uint8_t *) 0 ;
20871 PyObject * obj0 = 0 ;
20872 PyObject * obj1 = 0 ;
20873 PyObject * obj2 = 0 ;
20874 PyObject * obj3 = 0 ;
20876 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ProductQuantizer_compute_codes_with_assign_index",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20877 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20878 if (!SWIG_IsOK(res1)) {
20879 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_codes_with_assign_index" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20882 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20883 if (!SWIG_IsOK(res2)) {
20884 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_codes_with_assign_index" "', argument " "2"" of type '" "float const *""'");
20886 arg2 =
reinterpret_cast< float *
>(argp2);
20887 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
20888 if (!SWIG_IsOK(res3)) {
20889 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_codes_with_assign_index" "', argument " "3"" of type '" "uint8_t *""'");
20891 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
20892 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
20893 if (!SWIG_IsOK(ecode4)) {
20894 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "ProductQuantizer_compute_codes_with_assign_index" "', argument " "4"" of type '" "size_t""'");
20896 arg4 =
static_cast< size_t >(val4);
20898 Py_BEGIN_ALLOW_THREADS
20900 (arg1)->compute_codes_with_assign_index((
float const *)arg2,arg3,arg4);
20902 PyEval_RestoreThread(_save);
20904 if (PyErr_Occurred()) {
20907 PyErr_SetString(PyExc_RuntimeError, e.
what());
20911 Py_END_ALLOW_THREADS
20913 resultobj = SWIG_Py_Void();
20920 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20921 PyObject *resultobj = 0;
20923 uint8_t *arg2 = (uint8_t *) 0 ;
20924 float *arg3 = (
float *) 0 ;
20931 PyObject * obj0 = 0 ;
20932 PyObject * obj1 = 0 ;
20933 PyObject * obj2 = 0 ;
20935 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_decode",&obj0,&obj1,&obj2)) SWIG_fail;
20936 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20937 if (!SWIG_IsOK(res1)) {
20938 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20941 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
20942 if (!SWIG_IsOK(res2)) {
20943 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
20945 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
20946 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20947 if (!SWIG_IsOK(res3)) {
20948 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
20950 arg3 =
reinterpret_cast< float *
>(argp3);
20952 Py_BEGIN_ALLOW_THREADS
20956 PyEval_RestoreThread(_save);
20958 if (PyErr_Occurred()) {
20961 PyErr_SetString(PyExc_RuntimeError, e.
what());
20965 Py_END_ALLOW_THREADS
20967 resultobj = SWIG_Py_Void();
20974 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
20975 PyObject *resultobj = 0;
20977 uint8_t *arg2 = (uint8_t *) 0 ;
20978 float *arg3 = (
float *) 0 ;
20988 PyObject * obj0 = 0 ;
20989 PyObject * obj1 = 0 ;
20990 PyObject * obj2 = 0 ;
20991 PyObject * obj3 = 0 ;
20993 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ProductQuantizer_decode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20994 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20995 if (!SWIG_IsOK(res1)) {
20996 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20999 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
21000 if (!SWIG_IsOK(res2)) {
21001 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
21003 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
21004 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21005 if (!SWIG_IsOK(res3)) {
21006 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
21008 arg3 =
reinterpret_cast< float *
>(argp3);
21009 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
21010 if (!SWIG_IsOK(ecode4)) {
21011 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "ProductQuantizer_decode" "', argument " "4"" of type '" "size_t""'");
21013 arg4 =
static_cast< size_t >(val4);
21015 Py_BEGIN_ALLOW_THREADS
21019 PyEval_RestoreThread(_save);
21021 if (PyErr_Occurred()) {
21024 PyErr_SetString(PyExc_RuntimeError, e.
what());
21028 Py_END_ALLOW_THREADS
21030 resultobj = SWIG_Py_Void();
21037 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode(PyObject *
self, PyObject *args) {
21039 PyObject *argv[5] = {
21044 if (!PyTuple_Check(args)) SWIG_fail;
21045 argc = args ? PyObject_Length(args) : 0;
21046 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
21047 argv[ii] = PyTuple_GET_ITEM(args,ii);
21052 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21053 _v = SWIG_CheckState(res);
21056 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21057 _v = SWIG_CheckState(res);
21060 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
21061 _v = SWIG_CheckState(res);
21063 return _wrap_ProductQuantizer_decode__SWIG_0(
self, args);
21071 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21072 _v = SWIG_CheckState(res);
21075 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21076 _v = SWIG_CheckState(res);
21079 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
21080 _v = SWIG_CheckState(res);
21083 int res = SWIG_AsVal_size_t(argv[3], NULL);
21084 _v = SWIG_CheckState(res);
21087 return _wrap_ProductQuantizer_decode__SWIG_1(
self, args);
21095 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'ProductQuantizer_decode'.\n"
21096 " Possible C/C++ prototypes are:\n"
21097 " faiss::ProductQuantizer::decode(uint8_t const *,float *) const\n"
21098 " faiss::ProductQuantizer::decode(uint8_t const *,float *,size_t) const\n");
21103 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code_from_distance_table(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21104 PyObject *resultobj = 0;
21106 float *arg2 = (
float *) 0 ;
21107 uint8_t *arg3 = (uint8_t *) 0 ;
21114 PyObject * obj0 = 0 ;
21115 PyObject * obj1 = 0 ;
21116 PyObject * obj2 = 0 ;
21118 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_compute_code_from_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
21119 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21120 if (!SWIG_IsOK(res1)) {
21121 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21124 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21125 if (!SWIG_IsOK(res2)) {
21126 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "2"" of type '" "float const *""'");
21128 arg2 =
reinterpret_cast< float *
>(argp2);
21129 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
21130 if (!SWIG_IsOK(res3)) {
21131 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "3"" of type '" "uint8_t *""'");
21133 arg3 =
reinterpret_cast< uint8_t *
>(argp3);
21135 Py_BEGIN_ALLOW_THREADS
21139 PyEval_RestoreThread(_save);
21141 if (PyErr_Occurred()) {
21144 PyErr_SetString(PyExc_RuntimeError, e.
what());
21148 Py_END_ALLOW_THREADS
21150 resultobj = SWIG_Py_Void();
21157 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_table(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21158 PyObject *resultobj = 0;
21160 float *arg2 = (
float *) 0 ;
21161 float *arg3 = (
float *) 0 ;
21168 PyObject * obj0 = 0 ;
21169 PyObject * obj1 = 0 ;
21170 PyObject * obj2 = 0 ;
21172 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_compute_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
21173 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21174 if (!SWIG_IsOK(res1)) {
21175 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21178 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21179 if (!SWIG_IsOK(res2)) {
21180 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_distance_table" "', argument " "2"" of type '" "float const *""'");
21182 arg2 =
reinterpret_cast< float *
>(argp2);
21183 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21184 if (!SWIG_IsOK(res3)) {
21185 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_distance_table" "', argument " "3"" of type '" "float *""'");
21187 arg3 =
reinterpret_cast< float *
>(argp3);
21189 Py_BEGIN_ALLOW_THREADS
21193 PyEval_RestoreThread(_save);
21195 if (PyErr_Occurred()) {
21198 PyErr_SetString(PyExc_RuntimeError, e.
what());
21202 Py_END_ALLOW_THREADS
21204 resultobj = SWIG_Py_Void();
21211 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_table(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21212 PyObject *resultobj = 0;
21214 float *arg2 = (
float *) 0 ;
21215 float *arg3 = (
float *) 0 ;
21222 PyObject * obj0 = 0 ;
21223 PyObject * obj1 = 0 ;
21224 PyObject * obj2 = 0 ;
21226 if (!PyArg_ParseTuple(args,(
char *)
"OOO:ProductQuantizer_compute_inner_prod_table",&obj0,&obj1,&obj2)) SWIG_fail;
21227 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21228 if (!SWIG_IsOK(res1)) {
21229 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21232 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21233 if (!SWIG_IsOK(res2)) {
21234 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "2"" of type '" "float const *""'");
21236 arg2 =
reinterpret_cast< float *
>(argp2);
21237 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21238 if (!SWIG_IsOK(res3)) {
21239 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "3"" of type '" "float *""'");
21241 arg3 =
reinterpret_cast< float *
>(argp3);
21243 Py_BEGIN_ALLOW_THREADS
21247 PyEval_RestoreThread(_save);
21249 if (PyErr_Occurred()) {
21252 PyErr_SetString(PyExc_RuntimeError, e.
what());
21256 Py_END_ALLOW_THREADS
21258 resultobj = SWIG_Py_Void();
21265 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_tables(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21266 PyObject *resultobj = 0;
21269 float *arg3 = (
float *) 0 ;
21270 float *arg4 = (
float *) 0 ;
21279 PyObject * obj0 = 0 ;
21280 PyObject * obj1 = 0 ;
21281 PyObject * obj2 = 0 ;
21282 PyObject * obj3 = 0 ;
21284 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ProductQuantizer_compute_distance_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21285 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21286 if (!SWIG_IsOK(res1)) {
21287 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_distance_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21290 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
21291 if (!SWIG_IsOK(ecode2)) {
21292 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_compute_distance_tables" "', argument " "2"" of type '" "size_t""'");
21294 arg2 =
static_cast< size_t >(val2);
21295 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21296 if (!SWIG_IsOK(res3)) {
21297 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_distance_tables" "', argument " "3"" of type '" "float const *""'");
21299 arg3 =
reinterpret_cast< float *
>(argp3);
21300 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21301 if (!SWIG_IsOK(res4)) {
21302 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_compute_distance_tables" "', argument " "4"" of type '" "float *""'");
21304 arg4 =
reinterpret_cast< float *
>(argp4);
21306 Py_BEGIN_ALLOW_THREADS
21310 PyEval_RestoreThread(_save);
21312 if (PyErr_Occurred()) {
21315 PyErr_SetString(PyExc_RuntimeError, e.
what());
21319 Py_END_ALLOW_THREADS
21321 resultobj = SWIG_Py_Void();
21328 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_tables(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21329 PyObject *resultobj = 0;
21332 float *arg3 = (
float *) 0 ;
21333 float *arg4 = (
float *) 0 ;
21342 PyObject * obj0 = 0 ;
21343 PyObject * obj1 = 0 ;
21344 PyObject * obj2 = 0 ;
21345 PyObject * obj3 = 0 ;
21347 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:ProductQuantizer_compute_inner_prod_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21348 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21349 if (!SWIG_IsOK(res1)) {
21350 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21353 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
21354 if (!SWIG_IsOK(ecode2)) {
21355 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "2"" of type '" "size_t""'");
21357 arg2 =
static_cast< size_t >(val2);
21358 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21359 if (!SWIG_IsOK(res3)) {
21360 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "3"" of type '" "float const *""'");
21362 arg3 =
reinterpret_cast< float *
>(argp3);
21363 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21364 if (!SWIG_IsOK(res4)) {
21365 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "4"" of type '" "float *""'");
21367 arg4 =
reinterpret_cast< float *
>(argp4);
21369 Py_BEGIN_ALLOW_THREADS
21373 PyEval_RestoreThread(_save);
21375 if (PyErr_Occurred()) {
21378 PyErr_SetString(PyExc_RuntimeError, e.
what());
21382 Py_END_ALLOW_THREADS
21384 resultobj = SWIG_Py_Void();
21391 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21392 PyObject *resultobj = 0;
21394 float *arg2 = (
float *) 0 ;
21396 uint8_t *arg4 = (uint8_t *) 0 ;
21414 PyObject * obj0 = 0 ;
21415 PyObject * obj1 = 0 ;
21416 PyObject * obj2 = 0 ;
21417 PyObject * obj3 = 0 ;
21418 PyObject * obj4 = 0 ;
21419 PyObject * obj5 = 0 ;
21420 PyObject * obj6 = 0 ;
21422 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
21423 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21424 if (!SWIG_IsOK(res1)) {
21425 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21428 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21429 if (!SWIG_IsOK(res2)) {
21430 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
21432 arg2 =
reinterpret_cast< float *
>(argp2);
21433 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21434 if (!SWIG_IsOK(ecode3)) {
21435 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
21437 arg3 =
static_cast< size_t >(val3);
21438 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21439 if (!SWIG_IsOK(res4)) {
21440 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
21442 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
21443 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21444 if (!SWIG_IsOK(ecode5)) {
21445 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
21447 arg5 =
static_cast< size_t >(val5);
21448 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21449 if (!SWIG_IsOK(res6)) {
21450 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21453 ecode7 = SWIG_AsVal_bool(obj6, &val7);
21454 if (!SWIG_IsOK(ecode7)) {
21455 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "ProductQuantizer_search" "', argument " "7"" of type '" "bool""'");
21457 arg7 =
static_cast< bool >(val7);
21459 Py_BEGIN_ALLOW_THREADS
21461 ((
faiss::ProductQuantizer const *)arg1)->search((
float const *)arg2,arg3,(uint8_t
const *)arg4,arg5,arg6,arg7);
21463 PyEval_RestoreThread(_save);
21465 if (PyErr_Occurred()) {
21468 PyErr_SetString(PyExc_RuntimeError, e.
what());
21472 Py_END_ALLOW_THREADS
21474 resultobj = SWIG_Py_Void();
21481 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21482 PyObject *resultobj = 0;
21484 float *arg2 = (
float *) 0 ;
21486 uint8_t *arg4 = (uint8_t *) 0 ;
21501 PyObject * obj0 = 0 ;
21502 PyObject * obj1 = 0 ;
21503 PyObject * obj2 = 0 ;
21504 PyObject * obj3 = 0 ;
21505 PyObject * obj4 = 0 ;
21506 PyObject * obj5 = 0 ;
21508 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
21509 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21510 if (!SWIG_IsOK(res1)) {
21511 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21514 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21515 if (!SWIG_IsOK(res2)) {
21516 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
21518 arg2 =
reinterpret_cast< float *
>(argp2);
21519 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21520 if (!SWIG_IsOK(ecode3)) {
21521 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
21523 arg3 =
static_cast< size_t >(val3);
21524 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21525 if (!SWIG_IsOK(res4)) {
21526 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
21528 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
21529 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21530 if (!SWIG_IsOK(ecode5)) {
21531 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
21533 arg5 =
static_cast< size_t >(val5);
21534 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21535 if (!SWIG_IsOK(res6)) {
21536 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21540 Py_BEGIN_ALLOW_THREADS
21544 PyEval_RestoreThread(_save);
21546 if (PyErr_Occurred()) {
21549 PyErr_SetString(PyExc_RuntimeError, e.
what());
21553 Py_END_ALLOW_THREADS
21555 resultobj = SWIG_Py_Void();
21562 SWIGINTERN PyObject *_wrap_ProductQuantizer_search(PyObject *
self, PyObject *args) {
21564 PyObject *argv[8] = {
21569 if (!PyTuple_Check(args)) SWIG_fail;
21570 argc = args ? PyObject_Length(args) : 0;
21571 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
21572 argv[ii] = PyTuple_GET_ITEM(args,ii);
21577 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21578 _v = SWIG_CheckState(res);
21581 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21582 _v = SWIG_CheckState(res);
21585 int res = SWIG_AsVal_size_t(argv[2], NULL);
21586 _v = SWIG_CheckState(res);
21590 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21591 _v = SWIG_CheckState(res);
21594 int res = SWIG_AsVal_size_t(argv[4], NULL);
21595 _v = SWIG_CheckState(res);
21599 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21600 _v = SWIG_CheckState(res);
21602 return _wrap_ProductQuantizer_search__SWIG_1(
self, args);
21613 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21614 _v = SWIG_CheckState(res);
21617 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21618 _v = SWIG_CheckState(res);
21621 int res = SWIG_AsVal_size_t(argv[2], NULL);
21622 _v = SWIG_CheckState(res);
21626 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21627 _v = SWIG_CheckState(res);
21630 int res = SWIG_AsVal_size_t(argv[4], NULL);
21631 _v = SWIG_CheckState(res);
21635 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21636 _v = SWIG_CheckState(res);
21639 int res = SWIG_AsVal_bool(argv[6], NULL);
21640 _v = SWIG_CheckState(res);
21643 return _wrap_ProductQuantizer_search__SWIG_0(
self, args);
21654 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search'.\n"
21655 " Possible C/C++ prototypes are:\n"
21656 " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
21657 " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
21662 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21663 PyObject *resultobj = 0;
21665 float *arg2 = (
float *) 0 ;
21667 uint8_t *arg4 = (uint8_t *) 0 ;
21685 PyObject * obj0 = 0 ;
21686 PyObject * obj1 = 0 ;
21687 PyObject * obj2 = 0 ;
21688 PyObject * obj3 = 0 ;
21689 PyObject * obj4 = 0 ;
21690 PyObject * obj5 = 0 ;
21691 PyObject * obj6 = 0 ;
21693 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
21694 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21695 if (!SWIG_IsOK(res1)) {
21696 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21699 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21700 if (!SWIG_IsOK(res2)) {
21701 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
21703 arg2 =
reinterpret_cast< float *
>(argp2);
21704 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21705 if (!SWIG_IsOK(ecode3)) {
21706 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
21708 arg3 =
static_cast< size_t >(val3);
21709 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21710 if (!SWIG_IsOK(res4)) {
21711 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
21713 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
21714 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21715 if (!SWIG_IsOK(ecode5)) {
21716 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
21718 arg5 =
static_cast< size_t >(val5);
21719 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
21720 if (!SWIG_IsOK(res6)) {
21721 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
21724 ecode7 = SWIG_AsVal_bool(obj6, &val7);
21725 if (!SWIG_IsOK(ecode7)) {
21726 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "ProductQuantizer_search_ip" "', argument " "7"" of type '" "bool""'");
21728 arg7 =
static_cast< bool >(val7);
21730 Py_BEGIN_ALLOW_THREADS
21732 ((
faiss::ProductQuantizer const *)arg1)->search_ip((
float const *)arg2,arg3,(uint8_t
const *)arg4,arg5,arg6,arg7);
21734 PyEval_RestoreThread(_save);
21736 if (PyErr_Occurred()) {
21739 PyErr_SetString(PyExc_RuntimeError, e.
what());
21743 Py_END_ALLOW_THREADS
21745 resultobj = SWIG_Py_Void();
21752 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21753 PyObject *resultobj = 0;
21755 float *arg2 = (
float *) 0 ;
21757 uint8_t *arg4 = (uint8_t *) 0 ;
21772 PyObject * obj0 = 0 ;
21773 PyObject * obj1 = 0 ;
21774 PyObject * obj2 = 0 ;
21775 PyObject * obj3 = 0 ;
21776 PyObject * obj4 = 0 ;
21777 PyObject * obj5 = 0 ;
21779 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
21780 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21781 if (!SWIG_IsOK(res1)) {
21782 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21785 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21786 if (!SWIG_IsOK(res2)) {
21787 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
21789 arg2 =
reinterpret_cast< float *
>(argp2);
21790 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21791 if (!SWIG_IsOK(ecode3)) {
21792 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
21794 arg3 =
static_cast< size_t >(val3);
21795 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21796 if (!SWIG_IsOK(res4)) {
21797 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
21799 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
21800 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21801 if (!SWIG_IsOK(ecode5)) {
21802 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
21804 arg5 =
static_cast< size_t >(val5);
21805 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
21806 if (!SWIG_IsOK(res6)) {
21807 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
21811 Py_BEGIN_ALLOW_THREADS
21813 ((
faiss::ProductQuantizer const *)arg1)->search_ip((
float const *)arg2,arg3,(uint8_t
const *)arg4,arg5,arg6);
21815 PyEval_RestoreThread(_save);
21817 if (PyErr_Occurred()) {
21820 PyErr_SetString(PyExc_RuntimeError, e.
what());
21824 Py_END_ALLOW_THREADS
21826 resultobj = SWIG_Py_Void();
21833 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip(PyObject *
self, PyObject *args) {
21835 PyObject *argv[8] = {
21840 if (!PyTuple_Check(args)) SWIG_fail;
21841 argc = args ? PyObject_Length(args) : 0;
21842 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
21843 argv[ii] = PyTuple_GET_ITEM(args,ii);
21848 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21849 _v = SWIG_CheckState(res);
21852 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21853 _v = SWIG_CheckState(res);
21856 int res = SWIG_AsVal_size_t(argv[2], NULL);
21857 _v = SWIG_CheckState(res);
21861 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21862 _v = SWIG_CheckState(res);
21865 int res = SWIG_AsVal_size_t(argv[4], NULL);
21866 _v = SWIG_CheckState(res);
21870 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
21871 _v = SWIG_CheckState(res);
21873 return _wrap_ProductQuantizer_search_ip__SWIG_1(
self, args);
21884 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21885 _v = SWIG_CheckState(res);
21888 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21889 _v = SWIG_CheckState(res);
21892 int res = SWIG_AsVal_size_t(argv[2], NULL);
21893 _v = SWIG_CheckState(res);
21897 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21898 _v = SWIG_CheckState(res);
21901 int res = SWIG_AsVal_size_t(argv[4], NULL);
21902 _v = SWIG_CheckState(res);
21906 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
21907 _v = SWIG_CheckState(res);
21910 int res = SWIG_AsVal_bool(argv[6], NULL);
21911 _v = SWIG_CheckState(res);
21914 return _wrap_ProductQuantizer_search_ip__SWIG_0(
self, args);
21925 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_ip'.\n"
21926 " Possible C/C++ prototypes are:\n"
21927 " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *,bool) const\n"
21928 " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *) const\n");
21933 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21934 PyObject *resultobj = 0;
21936 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
21941 PyObject * obj0 = 0 ;
21942 PyObject * obj1 = 0 ;
21944 if (!PyArg_ParseTuple(args,(
char *)
"OO:ProductQuantizer_sdc_table_set",&obj0,&obj1)) SWIG_fail;
21945 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21946 if (!SWIG_IsOK(res1)) {
21947 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_sdc_table_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21950 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21951 if (!SWIG_IsOK(res2)) {
21952 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_sdc_table_set" "', argument " "2"" of type '" "std::vector< float > *""'");
21954 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
21955 if (arg1) (arg1)->sdc_table = *arg2;
21956 resultobj = SWIG_Py_Void();
21963 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21964 PyObject *resultobj = 0;
21968 PyObject * obj0 = 0 ;
21969 std::vector< float > *result = 0 ;
21971 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_sdc_table_get",&obj0)) SWIG_fail;
21972 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21973 if (!SWIG_IsOK(res1)) {
21974 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_sdc_table_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21977 result = (std::vector< float > *)& ((arg1)->sdc_table);
21978 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21985 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_sdc_table(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
21986 PyObject *resultobj = 0;
21990 PyObject * obj0 = 0 ;
21992 if (!PyArg_ParseTuple(args,(
char *)
"O:ProductQuantizer_compute_sdc_table",&obj0)) SWIG_fail;
21993 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21994 if (!SWIG_IsOK(res1)) {
21995 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_compute_sdc_table" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21999 Py_BEGIN_ALLOW_THREADS
22001 (arg1)->compute_sdc_table();
22003 PyEval_RestoreThread(_save);
22005 if (PyErr_Occurred()) {
22008 PyErr_SetString(PyExc_RuntimeError, e.
what());
22012 Py_END_ALLOW_THREADS
22014 resultobj = SWIG_Py_Void();
22021 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22022 PyObject *resultobj = 0;
22024 uint8_t *arg2 = (uint8_t *) 0 ;
22026 uint8_t *arg4 = (uint8_t *) 0 ;
22044 PyObject * obj0 = 0 ;
22045 PyObject * obj1 = 0 ;
22046 PyObject * obj2 = 0 ;
22047 PyObject * obj3 = 0 ;
22048 PyObject * obj4 = 0 ;
22049 PyObject * obj5 = 0 ;
22050 PyObject * obj6 = 0 ;
22052 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
22053 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22054 if (!SWIG_IsOK(res1)) {
22055 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
22058 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
22059 if (!SWIG_IsOK(res2)) {
22060 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
22062 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
22063 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22064 if (!SWIG_IsOK(ecode3)) {
22065 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
22067 arg3 =
static_cast< size_t >(val3);
22068 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22069 if (!SWIG_IsOK(res4)) {
22070 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
22072 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
22073 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22074 if (!SWIG_IsOK(ecode5)) {
22075 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
22077 arg5 =
static_cast< size_t >(val5);
22078 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
22079 if (!SWIG_IsOK(res6)) {
22080 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
22083 ecode7 = SWIG_AsVal_bool(obj6, &val7);
22084 if (!SWIG_IsOK(ecode7)) {
22085 SWIG_exception_fail(SWIG_ArgError(ecode7),
"in method '" "ProductQuantizer_search_sdc" "', argument " "7"" of type '" "bool""'");
22087 arg7 =
static_cast< bool >(val7);
22089 Py_BEGIN_ALLOW_THREADS
22091 ((
faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t
const *)arg2,arg3,(uint8_t
const *)arg4,arg5,arg6,arg7);
22093 PyEval_RestoreThread(_save);
22095 if (PyErr_Occurred()) {
22098 PyErr_SetString(PyExc_RuntimeError, e.
what());
22102 Py_END_ALLOW_THREADS
22104 resultobj = SWIG_Py_Void();
22111 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22112 PyObject *resultobj = 0;
22114 uint8_t *arg2 = (uint8_t *) 0 ;
22116 uint8_t *arg4 = (uint8_t *) 0 ;
22131 PyObject * obj0 = 0 ;
22132 PyObject * obj1 = 0 ;
22133 PyObject * obj2 = 0 ;
22134 PyObject * obj3 = 0 ;
22135 PyObject * obj4 = 0 ;
22136 PyObject * obj5 = 0 ;
22138 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
22139 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22140 if (!SWIG_IsOK(res1)) {
22141 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
22144 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
22145 if (!SWIG_IsOK(res2)) {
22146 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
22148 arg2 =
reinterpret_cast< uint8_t *
>(argp2);
22149 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22150 if (!SWIG_IsOK(ecode3)) {
22151 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
22153 arg3 =
static_cast< size_t >(val3);
22154 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22155 if (!SWIG_IsOK(res4)) {
22156 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
22158 arg4 =
reinterpret_cast< uint8_t *
>(argp4);
22159 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22160 if (!SWIG_IsOK(ecode5)) {
22161 SWIG_exception_fail(SWIG_ArgError(ecode5),
"in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
22163 arg5 =
static_cast< size_t >(val5);
22164 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
22165 if (!SWIG_IsOK(res6)) {
22166 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
22170 Py_BEGIN_ALLOW_THREADS
22172 ((
faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t
const *)arg2,arg3,(uint8_t
const *)arg4,arg5,arg6);
22174 PyEval_RestoreThread(_save);
22176 if (PyErr_Occurred()) {
22179 PyErr_SetString(PyExc_RuntimeError, e.
what());
22183 Py_END_ALLOW_THREADS
22185 resultobj = SWIG_Py_Void();
22192 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc(PyObject *
self, PyObject *args) {
22194 PyObject *argv[8] = {
22199 if (!PyTuple_Check(args)) SWIG_fail;
22200 argc = args ? PyObject_Length(args) : 0;
22201 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
22202 argv[ii] = PyTuple_GET_ITEM(args,ii);
22207 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22208 _v = SWIG_CheckState(res);
22211 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
22212 _v = SWIG_CheckState(res);
22215 int res = SWIG_AsVal_size_t(argv[2], NULL);
22216 _v = SWIG_CheckState(res);
22220 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22221 _v = SWIG_CheckState(res);
22224 int res = SWIG_AsVal_size_t(argv[4], NULL);
22225 _v = SWIG_CheckState(res);
22229 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
22230 _v = SWIG_CheckState(res);
22232 return _wrap_ProductQuantizer_search_sdc__SWIG_1(
self, args);
22243 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22244 _v = SWIG_CheckState(res);
22247 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
22248 _v = SWIG_CheckState(res);
22251 int res = SWIG_AsVal_size_t(argv[2], NULL);
22252 _v = SWIG_CheckState(res);
22256 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22257 _v = SWIG_CheckState(res);
22260 int res = SWIG_AsVal_size_t(argv[4], NULL);
22261 _v = SWIG_CheckState(res);
22265 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
22266 _v = SWIG_CheckState(res);
22269 int res = SWIG_AsVal_bool(argv[6], NULL);
22270 _v = SWIG_CheckState(res);
22273 return _wrap_ProductQuantizer_search_sdc__SWIG_0(
self, args);
22284 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_sdc'.\n"
22285 " Possible C/C++ prototypes are:\n"
22286 " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
22287 " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
22292 SWIGINTERN PyObject *_wrap_delete_ProductQuantizer(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22293 PyObject *resultobj = 0;
22297 PyObject * obj0 = 0 ;
22299 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_ProductQuantizer",&obj0)) SWIG_fail;
22300 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
22301 if (!SWIG_IsOK(res1)) {
22302 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
22306 resultobj = SWIG_Py_Void();
22313 SWIGINTERN PyObject *ProductQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22315 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
22316 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ProductQuantizer, SWIG_NewClientData(obj));
22317 return SWIG_Py_Void();
22320 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22321 PyObject *resultobj = 0;
22328 PyObject * obj0 = 0 ;
22329 PyObject * obj1 = 0 ;
22331 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransform_d_in_set",&obj0,&obj1)) SWIG_fail;
22332 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22333 if (!SWIG_IsOK(res1)) {
22334 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_d_in_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22337 ecode2 = SWIG_AsVal_int(obj1, &val2);
22338 if (!SWIG_IsOK(ecode2)) {
22339 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_d_in_set" "', argument " "2"" of type '" "int""'");
22341 arg2 =
static_cast< int >(val2);
22342 if (arg1) (arg1)->d_in = arg2;
22343 resultobj = SWIG_Py_Void();
22350 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22351 PyObject *resultobj = 0;
22355 PyObject * obj0 = 0 ;
22358 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransform_d_in_get",&obj0)) SWIG_fail;
22359 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22360 if (!SWIG_IsOK(res1)) {
22361 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_d_in_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22364 result = (int) ((arg1)->d_in);
22365 resultobj = SWIG_From_int(static_cast< int >(result));
22372 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22373 PyObject *resultobj = 0;
22380 PyObject * obj0 = 0 ;
22381 PyObject * obj1 = 0 ;
22383 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransform_d_out_set",&obj0,&obj1)) SWIG_fail;
22384 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22385 if (!SWIG_IsOK(res1)) {
22386 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_d_out_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22389 ecode2 = SWIG_AsVal_int(obj1, &val2);
22390 if (!SWIG_IsOK(ecode2)) {
22391 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_d_out_set" "', argument " "2"" of type '" "int""'");
22393 arg2 =
static_cast< int >(val2);
22394 if (arg1) (arg1)->d_out = arg2;
22395 resultobj = SWIG_Py_Void();
22402 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22403 PyObject *resultobj = 0;
22407 PyObject * obj0 = 0 ;
22410 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransform_d_out_get",&obj0)) SWIG_fail;
22411 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22412 if (!SWIG_IsOK(res1)) {
22413 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_d_out_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22416 result = (int) ((arg1)->d_out);
22417 resultobj = SWIG_From_int(static_cast< int >(result));
22424 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22425 PyObject *resultobj = 0;
22432 PyObject * obj0 = 0 ;
22433 PyObject * obj1 = 0 ;
22435 if (!PyArg_ParseTuple(args,(
char *)
"OO:VectorTransform_is_trained_set",&obj0,&obj1)) SWIG_fail;
22436 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22437 if (!SWIG_IsOK(res1)) {
22438 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_is_trained_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22441 ecode2 = SWIG_AsVal_bool(obj1, &val2);
22442 if (!SWIG_IsOK(ecode2)) {
22443 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_is_trained_set" "', argument " "2"" of type '" "bool""'");
22445 arg2 =
static_cast< bool >(val2);
22446 if (arg1) (arg1)->is_trained = arg2;
22447 resultobj = SWIG_Py_Void();
22454 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22455 PyObject *resultobj = 0;
22459 PyObject * obj0 = 0 ;
22462 if (!PyArg_ParseTuple(args,(
char *)
"O:VectorTransform_is_trained_get",&obj0)) SWIG_fail;
22463 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22464 if (!SWIG_IsOK(res1)) {
22465 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_is_trained_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22468 result = (bool) ((arg1)->is_trained);
22469 resultobj = SWIG_From_bool(static_cast< bool >(result));
22476 SWIGINTERN PyObject *_wrap_VectorTransform_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22477 PyObject *resultobj = 0;
22479 faiss::VectorTransform::idx_t arg2 ;
22480 float *arg3 = (
float *) 0 ;
22487 PyObject * obj0 = 0 ;
22488 PyObject * obj1 = 0 ;
22489 PyObject * obj2 = 0 ;
22491 if (!PyArg_ParseTuple(args,(
char *)
"OOO:VectorTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
22492 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22493 if (!SWIG_IsOK(res1)) {
22494 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_train" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22497 ecode2 = SWIG_AsVal_long(obj1, &val2);
22498 if (!SWIG_IsOK(ecode2)) {
22499 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_train" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22501 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
22502 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22503 if (!SWIG_IsOK(res3)) {
22504 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "VectorTransform_train" "', argument " "3"" of type '" "float const *""'");
22506 arg3 =
reinterpret_cast< float *
>(argp3);
22508 Py_BEGIN_ALLOW_THREADS
22510 (arg1)->train(arg2,(
float const *)arg3);
22512 PyEval_RestoreThread(_save);
22514 if (PyErr_Occurred()) {
22517 PyErr_SetString(PyExc_RuntimeError, e.
what());
22521 Py_END_ALLOW_THREADS
22523 resultobj = SWIG_Py_Void();
22530 SWIGINTERN PyObject *_wrap_VectorTransform_apply(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22531 PyObject *resultobj = 0;
22533 faiss::VectorTransform::idx_t arg2 ;
22534 float *arg3 = (
float *) 0 ;
22541 PyObject * obj0 = 0 ;
22542 PyObject * obj1 = 0 ;
22543 PyObject * obj2 = 0 ;
22544 float *result = 0 ;
22546 if (!PyArg_ParseTuple(args,(
char *)
"OOO:VectorTransform_apply",&obj0,&obj1,&obj2)) SWIG_fail;
22547 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22548 if (!SWIG_IsOK(res1)) {
22549 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_apply" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22552 ecode2 = SWIG_AsVal_long(obj1, &val2);
22553 if (!SWIG_IsOK(ecode2)) {
22554 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_apply" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22556 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
22557 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22558 if (!SWIG_IsOK(res3)) {
22559 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "VectorTransform_apply" "', argument " "3"" of type '" "float const *""'");
22561 arg3 =
reinterpret_cast< float *
>(argp3);
22563 Py_BEGIN_ALLOW_THREADS
22567 PyEval_RestoreThread(_save);
22569 if (PyErr_Occurred()) {
22572 PyErr_SetString(PyExc_RuntimeError, e.
what());
22576 Py_END_ALLOW_THREADS
22578 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
22585 SWIGINTERN PyObject *_wrap_VectorTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22586 PyObject *resultobj = 0;
22588 faiss::VectorTransform::idx_t arg2 ;
22589 float *arg3 = (
float *) 0 ;
22590 float *arg4 = (
float *) 0 ;
22599 PyObject * obj0 = 0 ;
22600 PyObject * obj1 = 0 ;
22601 PyObject * obj2 = 0 ;
22602 PyObject * obj3 = 0 ;
22604 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:VectorTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22605 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22606 if (!SWIG_IsOK(res1)) {
22607 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22610 ecode2 = SWIG_AsVal_long(obj1, &val2);
22611 if (!SWIG_IsOK(ecode2)) {
22612 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22614 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
22615 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22616 if (!SWIG_IsOK(res3)) {
22617 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "VectorTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
22619 arg3 =
reinterpret_cast< float *
>(argp3);
22620 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22621 if (!SWIG_IsOK(res4)) {
22622 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "VectorTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
22624 arg4 =
reinterpret_cast< float *
>(argp4);
22626 Py_BEGIN_ALLOW_THREADS
22630 PyEval_RestoreThread(_save);
22632 if (PyErr_Occurred()) {
22635 PyErr_SetString(PyExc_RuntimeError, e.
what());
22639 Py_END_ALLOW_THREADS
22641 resultobj = SWIG_Py_Void();
22648 SWIGINTERN PyObject *_wrap_VectorTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22649 PyObject *resultobj = 0;
22651 faiss::VectorTransform::idx_t arg2 ;
22652 float *arg3 = (
float *) 0 ;
22653 float *arg4 = (
float *) 0 ;
22662 PyObject * obj0 = 0 ;
22663 PyObject * obj1 = 0 ;
22664 PyObject * obj2 = 0 ;
22665 PyObject * obj3 = 0 ;
22667 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:VectorTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22668 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22669 if (!SWIG_IsOK(res1)) {
22670 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "VectorTransform_reverse_transform" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22673 ecode2 = SWIG_AsVal_long(obj1, &val2);
22674 if (!SWIG_IsOK(ecode2)) {
22675 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "VectorTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22677 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
22678 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22679 if (!SWIG_IsOK(res3)) {
22680 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "VectorTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
22682 arg3 =
reinterpret_cast< float *
>(argp3);
22683 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22684 if (!SWIG_IsOK(res4)) {
22685 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "VectorTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
22687 arg4 =
reinterpret_cast< float *
>(argp4);
22689 Py_BEGIN_ALLOW_THREADS
22693 PyEval_RestoreThread(_save);
22695 if (PyErr_Occurred()) {
22698 PyErr_SetString(PyExc_RuntimeError, e.
what());
22702 Py_END_ALLOW_THREADS
22704 resultobj = SWIG_Py_Void();
22711 SWIGINTERN PyObject *_wrap_delete_VectorTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22712 PyObject *resultobj = 0;
22716 PyObject * obj0 = 0 ;
22718 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_VectorTransform",&obj0)) SWIG_fail;
22719 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, SWIG_POINTER_DISOWN | 0 );
22720 if (!SWIG_IsOK(res1)) {
22721 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22725 Py_BEGIN_ALLOW_THREADS
22729 PyEval_RestoreThread(_save);
22731 if (PyErr_Occurred()) {
22734 PyErr_SetString(PyExc_RuntimeError, e.
what());
22738 Py_END_ALLOW_THREADS
22740 resultobj = SWIG_Py_Void();
22747 SWIGINTERN PyObject *VectorTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22749 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
22750 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorTransform, SWIG_NewClientData(obj));
22751 return SWIG_Py_Void();
22754 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22755 PyObject *resultobj = 0;
22762 PyObject * obj0 = 0 ;
22763 PyObject * obj1 = 0 ;
22765 if (!PyArg_ParseTuple(args,(
char *)
"OO:LinearTransform_have_bias_set",&obj0,&obj1)) SWIG_fail;
22766 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22767 if (!SWIG_IsOK(res1)) {
22768 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_have_bias_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22771 ecode2 = SWIG_AsVal_bool(obj1, &val2);
22772 if (!SWIG_IsOK(ecode2)) {
22773 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_have_bias_set" "', argument " "2"" of type '" "bool""'");
22775 arg2 =
static_cast< bool >(val2);
22776 if (arg1) (arg1)->have_bias = arg2;
22777 resultobj = SWIG_Py_Void();
22784 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22785 PyObject *resultobj = 0;
22789 PyObject * obj0 = 0 ;
22792 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_have_bias_get",&obj0)) SWIG_fail;
22793 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22794 if (!SWIG_IsOK(res1)) {
22795 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_have_bias_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22798 result = (bool) ((arg1)->have_bias);
22799 resultobj = SWIG_From_bool(static_cast< bool >(result));
22806 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22807 PyObject *resultobj = 0;
22814 PyObject * obj0 = 0 ;
22815 PyObject * obj1 = 0 ;
22817 if (!PyArg_ParseTuple(args,(
char *)
"OO:LinearTransform_is_orthonormal_set",&obj0,&obj1)) SWIG_fail;
22818 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22819 if (!SWIG_IsOK(res1)) {
22820 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_is_orthonormal_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22823 ecode2 = SWIG_AsVal_bool(obj1, &val2);
22824 if (!SWIG_IsOK(ecode2)) {
22825 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_is_orthonormal_set" "', argument " "2"" of type '" "bool""'");
22827 arg2 =
static_cast< bool >(val2);
22828 if (arg1) (arg1)->is_orthonormal = arg2;
22829 resultobj = SWIG_Py_Void();
22836 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22837 PyObject *resultobj = 0;
22841 PyObject * obj0 = 0 ;
22844 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_is_orthonormal_get",&obj0)) SWIG_fail;
22845 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22846 if (!SWIG_IsOK(res1)) {
22847 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_is_orthonormal_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22850 result = (bool) ((arg1)->is_orthonormal);
22851 resultobj = SWIG_From_bool(static_cast< bool >(result));
22858 SWIGINTERN PyObject *_wrap_LinearTransform_A_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22859 PyObject *resultobj = 0;
22861 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22866 PyObject * obj0 = 0 ;
22867 PyObject * obj1 = 0 ;
22869 if (!PyArg_ParseTuple(args,(
char *)
"OO:LinearTransform_A_set",&obj0,&obj1)) SWIG_fail;
22870 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22871 if (!SWIG_IsOK(res1)) {
22872 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_A_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22875 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22876 if (!SWIG_IsOK(res2)) {
22877 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "LinearTransform_A_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22879 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
22880 if (arg1) (arg1)->A = *arg2;
22881 resultobj = SWIG_Py_Void();
22888 SWIGINTERN PyObject *_wrap_LinearTransform_A_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22889 PyObject *resultobj = 0;
22893 PyObject * obj0 = 0 ;
22894 std::vector< float > *result = 0 ;
22896 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_A_get",&obj0)) SWIG_fail;
22897 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22898 if (!SWIG_IsOK(res1)) {
22899 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_A_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22902 result = (std::vector< float > *)& ((arg1)->A);
22903 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22910 SWIGINTERN PyObject *_wrap_LinearTransform_b_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22911 PyObject *resultobj = 0;
22913 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22918 PyObject * obj0 = 0 ;
22919 PyObject * obj1 = 0 ;
22921 if (!PyArg_ParseTuple(args,(
char *)
"OO:LinearTransform_b_set",&obj0,&obj1)) SWIG_fail;
22922 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22923 if (!SWIG_IsOK(res1)) {
22924 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_b_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22927 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22928 if (!SWIG_IsOK(res2)) {
22929 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "LinearTransform_b_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22931 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
22932 if (arg1) (arg1)->b = *arg2;
22933 resultobj = SWIG_Py_Void();
22940 SWIGINTERN PyObject *_wrap_LinearTransform_b_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22941 PyObject *resultobj = 0;
22945 PyObject * obj0 = 0 ;
22946 std::vector< float > *result = 0 ;
22948 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_b_get",&obj0)) SWIG_fail;
22949 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22950 if (!SWIG_IsOK(res1)) {
22951 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_b_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22954 result = (std::vector< float > *)& ((arg1)->b);
22955 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22962 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
22963 PyObject *resultobj = 0;
22973 PyObject * obj0 = 0 ;
22974 PyObject * obj1 = 0 ;
22975 PyObject * obj2 = 0 ;
22978 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_LinearTransform",&obj0,&obj1,&obj2)) SWIG_fail;
22979 ecode1 = SWIG_AsVal_int(obj0, &val1);
22980 if (!SWIG_IsOK(ecode1)) {
22981 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
22983 arg1 =
static_cast< int >(val1);
22984 ecode2 = SWIG_AsVal_int(obj1, &val2);
22985 if (!SWIG_IsOK(ecode2)) {
22986 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
22988 arg2 =
static_cast< int >(val2);
22989 ecode3 = SWIG_AsVal_bool(obj2, &val3);
22990 if (!SWIG_IsOK(ecode3)) {
22991 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_LinearTransform" "', argument " "3"" of type '" "bool""'");
22993 arg3 =
static_cast< bool >(val3);
22995 Py_BEGIN_ALLOW_THREADS
22999 PyEval_RestoreThread(_save);
23001 if (PyErr_Occurred()) {
23004 PyErr_SetString(PyExc_RuntimeError, e.
what());
23008 Py_END_ALLOW_THREADS
23010 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23017 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23018 PyObject *resultobj = 0;
23025 PyObject * obj0 = 0 ;
23026 PyObject * obj1 = 0 ;
23029 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_LinearTransform",&obj0,&obj1)) SWIG_fail;
23030 ecode1 = SWIG_AsVal_int(obj0, &val1);
23031 if (!SWIG_IsOK(ecode1)) {
23032 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
23034 arg1 =
static_cast< int >(val1);
23035 ecode2 = SWIG_AsVal_int(obj1, &val2);
23036 if (!SWIG_IsOK(ecode2)) {
23037 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
23039 arg2 =
static_cast< int >(val2);
23041 Py_BEGIN_ALLOW_THREADS
23045 PyEval_RestoreThread(_save);
23047 if (PyErr_Occurred()) {
23050 PyErr_SetString(PyExc_RuntimeError, e.
what());
23054 Py_END_ALLOW_THREADS
23056 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23063 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23064 PyObject *resultobj = 0;
23068 PyObject * obj0 = 0 ;
23071 if (!PyArg_ParseTuple(args,(
char *)
"O:new_LinearTransform",&obj0)) SWIG_fail;
23072 ecode1 = SWIG_AsVal_int(obj0, &val1);
23073 if (!SWIG_IsOK(ecode1)) {
23074 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
23076 arg1 =
static_cast< int >(val1);
23078 Py_BEGIN_ALLOW_THREADS
23082 PyEval_RestoreThread(_save);
23084 if (PyErr_Occurred()) {
23087 PyErr_SetString(PyExc_RuntimeError, e.
what());
23091 Py_END_ALLOW_THREADS
23093 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23100 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23101 PyObject *resultobj = 0;
23104 if (!PyArg_ParseTuple(args,(
char *)
":new_LinearTransform")) SWIG_fail;
23106 Py_BEGIN_ALLOW_THREADS
23110 PyEval_RestoreThread(_save);
23112 if (PyErr_Occurred()) {
23115 PyErr_SetString(PyExc_RuntimeError, e.
what());
23119 Py_END_ALLOW_THREADS
23121 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23128 SWIGINTERN PyObject *_wrap_new_LinearTransform(PyObject *
self, PyObject *args) {
23130 PyObject *argv[4] = {
23135 if (!PyTuple_Check(args)) SWIG_fail;
23136 argc = args ? PyObject_Length(args) : 0;
23137 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
23138 argv[ii] = PyTuple_GET_ITEM(args,ii);
23141 return _wrap_new_LinearTransform__SWIG_3(
self, args);
23146 int res = SWIG_AsVal_int(argv[0], NULL);
23147 _v = SWIG_CheckState(res);
23150 return _wrap_new_LinearTransform__SWIG_2(
self, args);
23156 int res = SWIG_AsVal_int(argv[0], NULL);
23157 _v = SWIG_CheckState(res);
23161 int res = SWIG_AsVal_int(argv[1], NULL);
23162 _v = SWIG_CheckState(res);
23165 return _wrap_new_LinearTransform__SWIG_1(
self, args);
23172 int res = SWIG_AsVal_int(argv[0], NULL);
23173 _v = SWIG_CheckState(res);
23177 int res = SWIG_AsVal_int(argv[1], NULL);
23178 _v = SWIG_CheckState(res);
23182 int res = SWIG_AsVal_bool(argv[2], NULL);
23183 _v = SWIG_CheckState(res);
23186 return _wrap_new_LinearTransform__SWIG_0(
self, args);
23193 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_LinearTransform'.\n"
23194 " Possible C/C++ prototypes are:\n"
23195 " faiss::LinearTransform::LinearTransform(int,int,bool)\n"
23196 " faiss::LinearTransform::LinearTransform(int,int)\n"
23197 " faiss::LinearTransform::LinearTransform(int)\n"
23198 " faiss::LinearTransform::LinearTransform()\n");
23203 SWIGINTERN PyObject *_wrap_LinearTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23204 PyObject *resultobj = 0;
23206 faiss::VectorTransform::idx_t arg2 ;
23207 float *arg3 = (
float *) 0 ;
23208 float *arg4 = (
float *) 0 ;
23217 PyObject * obj0 = 0 ;
23218 PyObject * obj1 = 0 ;
23219 PyObject * obj2 = 0 ;
23220 PyObject * obj3 = 0 ;
23222 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:LinearTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23223 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23224 if (!SWIG_IsOK(res1)) {
23225 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23228 ecode2 = SWIG_AsVal_long(obj1, &val2);
23229 if (!SWIG_IsOK(ecode2)) {
23230 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23232 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
23233 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23234 if (!SWIG_IsOK(res3)) {
23235 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "LinearTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
23237 arg3 =
reinterpret_cast< float *
>(argp3);
23238 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23239 if (!SWIG_IsOK(res4)) {
23240 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "LinearTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
23242 arg4 =
reinterpret_cast< float *
>(argp4);
23244 Py_BEGIN_ALLOW_THREADS
23248 PyEval_RestoreThread(_save);
23250 if (PyErr_Occurred()) {
23253 PyErr_SetString(PyExc_RuntimeError, e.
what());
23257 Py_END_ALLOW_THREADS
23259 resultobj = SWIG_Py_Void();
23266 SWIGINTERN PyObject *_wrap_LinearTransform_transform_transpose(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23267 PyObject *resultobj = 0;
23269 faiss::VectorTransform::idx_t arg2 ;
23270 float *arg3 = (
float *) 0 ;
23271 float *arg4 = (
float *) 0 ;
23280 PyObject * obj0 = 0 ;
23281 PyObject * obj1 = 0 ;
23282 PyObject * obj2 = 0 ;
23283 PyObject * obj3 = 0 ;
23285 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:LinearTransform_transform_transpose",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23286 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23287 if (!SWIG_IsOK(res1)) {
23288 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_transform_transpose" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23291 ecode2 = SWIG_AsVal_long(obj1, &val2);
23292 if (!SWIG_IsOK(ecode2)) {
23293 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_transform_transpose" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23295 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
23296 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23297 if (!SWIG_IsOK(res3)) {
23298 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "LinearTransform_transform_transpose" "', argument " "3"" of type '" "float const *""'");
23300 arg3 =
reinterpret_cast< float *
>(argp3);
23301 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23302 if (!SWIG_IsOK(res4)) {
23303 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "LinearTransform_transform_transpose" "', argument " "4"" of type '" "float *""'");
23305 arg4 =
reinterpret_cast< float *
>(argp4);
23307 Py_BEGIN_ALLOW_THREADS
23311 PyEval_RestoreThread(_save);
23313 if (PyErr_Occurred()) {
23316 PyErr_SetString(PyExc_RuntimeError, e.
what());
23320 Py_END_ALLOW_THREADS
23322 resultobj = SWIG_Py_Void();
23329 SWIGINTERN PyObject *_wrap_LinearTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23330 PyObject *resultobj = 0;
23332 faiss::VectorTransform::idx_t arg2 ;
23333 float *arg3 = (
float *) 0 ;
23334 float *arg4 = (
float *) 0 ;
23343 PyObject * obj0 = 0 ;
23344 PyObject * obj1 = 0 ;
23345 PyObject * obj2 = 0 ;
23346 PyObject * obj3 = 0 ;
23348 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:LinearTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23349 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23350 if (!SWIG_IsOK(res1)) {
23351 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_reverse_transform" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23354 ecode2 = SWIG_AsVal_long(obj1, &val2);
23355 if (!SWIG_IsOK(ecode2)) {
23356 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23358 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
23359 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23360 if (!SWIG_IsOK(res3)) {
23361 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "LinearTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
23363 arg3 =
reinterpret_cast< float *
>(argp3);
23364 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23365 if (!SWIG_IsOK(res4)) {
23366 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "LinearTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
23368 arg4 =
reinterpret_cast< float *
>(argp4);
23370 Py_BEGIN_ALLOW_THREADS
23374 PyEval_RestoreThread(_save);
23376 if (PyErr_Occurred()) {
23379 PyErr_SetString(PyExc_RuntimeError, e.
what());
23383 Py_END_ALLOW_THREADS
23385 resultobj = SWIG_Py_Void();
23392 SWIGINTERN PyObject *_wrap_LinearTransform_set_is_orthonormal(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23393 PyObject *resultobj = 0;
23397 PyObject * obj0 = 0 ;
23399 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_set_is_orthonormal",&obj0)) SWIG_fail;
23400 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23401 if (!SWIG_IsOK(res1)) {
23402 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_set_is_orthonormal" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23406 Py_BEGIN_ALLOW_THREADS
23408 (arg1)->set_is_orthonormal();
23410 PyEval_RestoreThread(_save);
23412 if (PyErr_Occurred()) {
23415 PyErr_SetString(PyExc_RuntimeError, e.
what());
23419 Py_END_ALLOW_THREADS
23421 resultobj = SWIG_Py_Void();
23428 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23429 PyObject *resultobj = 0;
23436 PyObject * obj0 = 0 ;
23437 PyObject * obj1 = 0 ;
23439 if (!PyArg_ParseTuple(args,(
char *)
"OO:LinearTransform_verbose_set",&obj0,&obj1)) SWIG_fail;
23440 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23441 if (!SWIG_IsOK(res1)) {
23442 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_verbose_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23445 ecode2 = SWIG_AsVal_bool(obj1, &val2);
23446 if (!SWIG_IsOK(ecode2)) {
23447 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "LinearTransform_verbose_set" "', argument " "2"" of type '" "bool""'");
23449 arg2 =
static_cast< bool >(val2);
23450 if (arg1) (arg1)->verbose = arg2;
23451 resultobj = SWIG_Py_Void();
23458 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23459 PyObject *resultobj = 0;
23463 PyObject * obj0 = 0 ;
23466 if (!PyArg_ParseTuple(args,(
char *)
"O:LinearTransform_verbose_get",&obj0)) SWIG_fail;
23467 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23468 if (!SWIG_IsOK(res1)) {
23469 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "LinearTransform_verbose_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23472 result = (bool) ((arg1)->verbose);
23473 resultobj = SWIG_From_bool(static_cast< bool >(result));
23480 SWIGINTERN PyObject *_wrap_delete_LinearTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23481 PyObject *resultobj = 0;
23485 PyObject * obj0 = 0 ;
23487 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_LinearTransform",&obj0)) SWIG_fail;
23488 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_DISOWN | 0 );
23489 if (!SWIG_IsOK(res1)) {
23490 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_LinearTransform" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23494 Py_BEGIN_ALLOW_THREADS
23498 PyEval_RestoreThread(_save);
23500 if (PyErr_Occurred()) {
23503 PyErr_SetString(PyExc_RuntimeError, e.
what());
23507 Py_END_ALLOW_THREADS
23509 resultobj = SWIG_Py_Void();
23516 SWIGINTERN PyObject *LinearTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23518 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
23519 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__LinearTransform, SWIG_NewClientData(obj));
23520 return SWIG_Py_Void();
23523 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23524 PyObject *resultobj = 0;
23531 PyObject * obj0 = 0 ;
23532 PyObject * obj1 = 0 ;
23535 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_RandomRotationMatrix",&obj0,&obj1)) SWIG_fail;
23536 ecode1 = SWIG_AsVal_int(obj0, &val1);
23537 if (!SWIG_IsOK(ecode1)) {
23538 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_RandomRotationMatrix" "', argument " "1"" of type '" "int""'");
23540 arg1 =
static_cast< int >(val1);
23541 ecode2 = SWIG_AsVal_int(obj1, &val2);
23542 if (!SWIG_IsOK(ecode2)) {
23543 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_RandomRotationMatrix" "', argument " "2"" of type '" "int""'");
23545 arg2 =
static_cast< int >(val2);
23547 Py_BEGIN_ALLOW_THREADS
23551 PyEval_RestoreThread(_save);
23553 if (PyErr_Occurred()) {
23556 PyErr_SetString(PyExc_RuntimeError, e.
what());
23560 Py_END_ALLOW_THREADS
23562 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
23569 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_init(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23570 PyObject *resultobj = 0;
23577 PyObject * obj0 = 0 ;
23578 PyObject * obj1 = 0 ;
23580 if (!PyArg_ParseTuple(args,(
char *)
"OO:RandomRotationMatrix_init",&obj0,&obj1)) SWIG_fail;
23581 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
23582 if (!SWIG_IsOK(res1)) {
23583 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomRotationMatrix_init" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23586 ecode2 = SWIG_AsVal_int(obj1, &val2);
23587 if (!SWIG_IsOK(ecode2)) {
23588 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "RandomRotationMatrix_init" "', argument " "2"" of type '" "int""'");
23590 arg2 =
static_cast< int >(val2);
23592 Py_BEGIN_ALLOW_THREADS
23594 (arg1)->init(arg2);
23596 PyEval_RestoreThread(_save);
23598 if (PyErr_Occurred()) {
23601 PyErr_SetString(PyExc_RuntimeError, e.
what());
23605 Py_END_ALLOW_THREADS
23607 resultobj = SWIG_Py_Void();
23614 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23615 PyObject *resultobj = 0;
23618 float *arg3 = (
float *) 0 ;
23625 PyObject * obj0 = 0 ;
23626 PyObject * obj1 = 0 ;
23627 PyObject * obj2 = 0 ;
23629 if (!PyArg_ParseTuple(args,(
char *)
"OOO:RandomRotationMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
23630 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
23631 if (!SWIG_IsOK(res1)) {
23632 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RandomRotationMatrix_train" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23635 ecode2 = SWIG_AsVal_long(obj1, &val2);
23636 if (!SWIG_IsOK(ecode2)) {
23637 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "RandomRotationMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
23640 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23641 if (!SWIG_IsOK(res3)) {
23642 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "RandomRotationMatrix_train" "', argument " "3"" of type '" "float const *""'");
23644 arg3 =
reinterpret_cast< float *
>(argp3);
23646 Py_BEGIN_ALLOW_THREADS
23648 (arg1)->train(arg2,(
float const *)arg3);
23650 PyEval_RestoreThread(_save);
23652 if (PyErr_Occurred()) {
23655 PyErr_SetString(PyExc_RuntimeError, e.
what());
23659 Py_END_ALLOW_THREADS
23661 resultobj = SWIG_Py_Void();
23668 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23669 PyObject *resultobj = 0;
23672 if (!PyArg_ParseTuple(args,(
char *)
":new_RandomRotationMatrix")) SWIG_fail;
23674 Py_BEGIN_ALLOW_THREADS
23678 PyEval_RestoreThread(_save);
23680 if (PyErr_Occurred()) {
23683 PyErr_SetString(PyExc_RuntimeError, e.
what());
23687 Py_END_ALLOW_THREADS
23689 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
23696 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix(PyObject *
self, PyObject *args) {
23698 PyObject *argv[3] = {
23703 if (!PyTuple_Check(args)) SWIG_fail;
23704 argc = args ? PyObject_Length(args) : 0;
23705 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
23706 argv[ii] = PyTuple_GET_ITEM(args,ii);
23709 return _wrap_new_RandomRotationMatrix__SWIG_1(
self, args);
23714 int res = SWIG_AsVal_int(argv[0], NULL);
23715 _v = SWIG_CheckState(res);
23719 int res = SWIG_AsVal_int(argv[1], NULL);
23720 _v = SWIG_CheckState(res);
23723 return _wrap_new_RandomRotationMatrix__SWIG_0(
self, args);
23729 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_RandomRotationMatrix'.\n"
23730 " Possible C/C++ prototypes are:\n"
23731 " faiss::RandomRotationMatrix::RandomRotationMatrix(int,int)\n"
23732 " faiss::RandomRotationMatrix::RandomRotationMatrix()\n");
23737 SWIGINTERN PyObject *_wrap_delete_RandomRotationMatrix(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23738 PyObject *resultobj = 0;
23742 PyObject * obj0 = 0 ;
23744 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_RandomRotationMatrix",&obj0)) SWIG_fail;
23745 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_DISOWN | 0 );
23746 if (!SWIG_IsOK(res1)) {
23747 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_RandomRotationMatrix" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23751 resultobj = SWIG_Py_Void();
23758 SWIGINTERN PyObject *RandomRotationMatrix_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23760 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
23761 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_NewClientData(obj));
23762 return SWIG_Py_Void();
23765 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23766 PyObject *resultobj = 0;
23773 PyObject * obj0 = 0 ;
23774 PyObject * obj1 = 0 ;
23776 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_eigen_power_set",&obj0,&obj1)) SWIG_fail;
23777 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23778 if (!SWIG_IsOK(res1)) {
23779 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_eigen_power_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23782 ecode2 = SWIG_AsVal_float(obj1, &val2);
23783 if (!SWIG_IsOK(ecode2)) {
23784 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "PCAMatrix_eigen_power_set" "', argument " "2"" of type '" "float""'");
23786 arg2 =
static_cast< float >(val2);
23787 if (arg1) (arg1)->eigen_power = arg2;
23788 resultobj = SWIG_Py_Void();
23795 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23796 PyObject *resultobj = 0;
23800 PyObject * obj0 = 0 ;
23803 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_eigen_power_get",&obj0)) SWIG_fail;
23804 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23805 if (!SWIG_IsOK(res1)) {
23806 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_eigen_power_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23809 result = (float) ((arg1)->eigen_power);
23810 resultobj = SWIG_From_float(static_cast< float >(result));
23817 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23818 PyObject *resultobj = 0;
23825 PyObject * obj0 = 0 ;
23826 PyObject * obj1 = 0 ;
23828 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_random_rotation_set",&obj0,&obj1)) SWIG_fail;
23829 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23830 if (!SWIG_IsOK(res1)) {
23831 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_random_rotation_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23834 ecode2 = SWIG_AsVal_bool(obj1, &val2);
23835 if (!SWIG_IsOK(ecode2)) {
23836 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "PCAMatrix_random_rotation_set" "', argument " "2"" of type '" "bool""'");
23838 arg2 =
static_cast< bool >(val2);
23839 if (arg1) (arg1)->random_rotation = arg2;
23840 resultobj = SWIG_Py_Void();
23847 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23848 PyObject *resultobj = 0;
23852 PyObject * obj0 = 0 ;
23855 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_random_rotation_get",&obj0)) SWIG_fail;
23856 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23857 if (!SWIG_IsOK(res1)) {
23858 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_random_rotation_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23861 result = (bool) ((arg1)->random_rotation);
23862 resultobj = SWIG_From_bool(static_cast< bool >(result));
23869 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23870 PyObject *resultobj = 0;
23877 PyObject * obj0 = 0 ;
23878 PyObject * obj1 = 0 ;
23880 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_max_points_per_d_set",&obj0,&obj1)) SWIG_fail;
23881 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23882 if (!SWIG_IsOK(res1)) {
23883 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_max_points_per_d_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23886 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
23887 if (!SWIG_IsOK(ecode2)) {
23888 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "PCAMatrix_max_points_per_d_set" "', argument " "2"" of type '" "size_t""'");
23890 arg2 =
static_cast< size_t >(val2);
23891 if (arg1) (arg1)->max_points_per_d = arg2;
23892 resultobj = SWIG_Py_Void();
23899 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23900 PyObject *resultobj = 0;
23904 PyObject * obj0 = 0 ;
23907 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_max_points_per_d_get",&obj0)) SWIG_fail;
23908 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23909 if (!SWIG_IsOK(res1)) {
23910 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_max_points_per_d_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23913 result = (size_t) ((arg1)->max_points_per_d);
23914 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
23921 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23922 PyObject *resultobj = 0;
23929 PyObject * obj0 = 0 ;
23930 PyObject * obj1 = 0 ;
23932 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_balanced_bins_set",&obj0,&obj1)) SWIG_fail;
23933 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23934 if (!SWIG_IsOK(res1)) {
23935 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_balanced_bins_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23938 ecode2 = SWIG_AsVal_int(obj1, &val2);
23939 if (!SWIG_IsOK(ecode2)) {
23940 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "PCAMatrix_balanced_bins_set" "', argument " "2"" of type '" "int""'");
23942 arg2 =
static_cast< int >(val2);
23943 if (arg1) (arg1)->balanced_bins = arg2;
23944 resultobj = SWIG_Py_Void();
23951 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23952 PyObject *resultobj = 0;
23956 PyObject * obj0 = 0 ;
23959 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_balanced_bins_get",&obj0)) SWIG_fail;
23960 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23961 if (!SWIG_IsOK(res1)) {
23962 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_balanced_bins_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23965 result = (int) ((arg1)->balanced_bins);
23966 resultobj = SWIG_From_int(static_cast< int >(result));
23973 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
23974 PyObject *resultobj = 0;
23976 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
23981 PyObject * obj0 = 0 ;
23982 PyObject * obj1 = 0 ;
23984 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_mean_set",&obj0,&obj1)) SWIG_fail;
23985 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23986 if (!SWIG_IsOK(res1)) {
23987 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_mean_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23990 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
23991 if (!SWIG_IsOK(res2)) {
23992 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "PCAMatrix_mean_set" "', argument " "2"" of type '" "std::vector< float > *""'");
23994 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
23995 if (arg1) (arg1)->mean = *arg2;
23996 resultobj = SWIG_Py_Void();
24003 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24004 PyObject *resultobj = 0;
24008 PyObject * obj0 = 0 ;
24009 std::vector< float > *result = 0 ;
24011 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_mean_get",&obj0)) SWIG_fail;
24012 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24013 if (!SWIG_IsOK(res1)) {
24014 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_mean_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24017 result = (std::vector< float > *)& ((arg1)->mean);
24018 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24025 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24026 PyObject *resultobj = 0;
24028 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
24033 PyObject * obj0 = 0 ;
24034 PyObject * obj1 = 0 ;
24036 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_eigenvalues_set",&obj0,&obj1)) SWIG_fail;
24037 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24038 if (!SWIG_IsOK(res1)) {
24039 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_eigenvalues_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24042 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24043 if (!SWIG_IsOK(res2)) {
24044 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "PCAMatrix_eigenvalues_set" "', argument " "2"" of type '" "std::vector< float > *""'");
24046 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
24047 if (arg1) (arg1)->eigenvalues = *arg2;
24048 resultobj = SWIG_Py_Void();
24055 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24056 PyObject *resultobj = 0;
24060 PyObject * obj0 = 0 ;
24061 std::vector< float > *result = 0 ;
24063 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_eigenvalues_get",&obj0)) SWIG_fail;
24064 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24065 if (!SWIG_IsOK(res1)) {
24066 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_eigenvalues_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24069 result = (std::vector< float > *)& ((arg1)->eigenvalues);
24070 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24077 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24078 PyObject *resultobj = 0;
24080 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
24085 PyObject * obj0 = 0 ;
24086 PyObject * obj1 = 0 ;
24088 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_PCAMat_set",&obj0,&obj1)) SWIG_fail;
24089 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24090 if (!SWIG_IsOK(res1)) {
24091 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_PCAMat_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24094 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24095 if (!SWIG_IsOK(res2)) {
24096 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "PCAMatrix_PCAMat_set" "', argument " "2"" of type '" "std::vector< float > *""'");
24098 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
24099 if (arg1) (arg1)->PCAMat = *arg2;
24100 resultobj = SWIG_Py_Void();
24107 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24108 PyObject *resultobj = 0;
24112 PyObject * obj0 = 0 ;
24113 std::vector< float > *result = 0 ;
24115 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_PCAMat_get",&obj0)) SWIG_fail;
24116 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24117 if (!SWIG_IsOK(res1)) {
24118 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_PCAMat_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24121 result = (std::vector< float > *)& ((arg1)->PCAMat);
24122 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24129 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24130 PyObject *resultobj = 0;
24143 PyObject * obj0 = 0 ;
24144 PyObject * obj1 = 0 ;
24145 PyObject * obj2 = 0 ;
24146 PyObject * obj3 = 0 ;
24149 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:new_PCAMatrix",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24150 ecode1 = SWIG_AsVal_int(obj0, &val1);
24151 if (!SWIG_IsOK(ecode1)) {
24152 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24154 arg1 =
static_cast< int >(val1);
24155 ecode2 = SWIG_AsVal_int(obj1, &val2);
24156 if (!SWIG_IsOK(ecode2)) {
24157 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24159 arg2 =
static_cast< int >(val2);
24160 ecode3 = SWIG_AsVal_float(obj2, &val3);
24161 if (!SWIG_IsOK(ecode3)) {
24162 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
24164 arg3 =
static_cast< float >(val3);
24165 ecode4 = SWIG_AsVal_bool(obj3, &val4);
24166 if (!SWIG_IsOK(ecode4)) {
24167 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "new_PCAMatrix" "', argument " "4"" of type '" "bool""'");
24169 arg4 =
static_cast< bool >(val4);
24171 Py_BEGIN_ALLOW_THREADS
24175 PyEval_RestoreThread(_save);
24177 if (PyErr_Occurred()) {
24180 PyErr_SetString(PyExc_RuntimeError, e.
what());
24184 Py_END_ALLOW_THREADS
24186 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24193 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24194 PyObject *resultobj = 0;
24204 PyObject * obj0 = 0 ;
24205 PyObject * obj1 = 0 ;
24206 PyObject * obj2 = 0 ;
24209 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_PCAMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
24210 ecode1 = SWIG_AsVal_int(obj0, &val1);
24211 if (!SWIG_IsOK(ecode1)) {
24212 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24214 arg1 =
static_cast< int >(val1);
24215 ecode2 = SWIG_AsVal_int(obj1, &val2);
24216 if (!SWIG_IsOK(ecode2)) {
24217 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24219 arg2 =
static_cast< int >(val2);
24220 ecode3 = SWIG_AsVal_float(obj2, &val3);
24221 if (!SWIG_IsOK(ecode3)) {
24222 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
24224 arg3 =
static_cast< float >(val3);
24226 Py_BEGIN_ALLOW_THREADS
24230 PyEval_RestoreThread(_save);
24232 if (PyErr_Occurred()) {
24235 PyErr_SetString(PyExc_RuntimeError, e.
what());
24239 Py_END_ALLOW_THREADS
24241 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24248 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24249 PyObject *resultobj = 0;
24256 PyObject * obj0 = 0 ;
24257 PyObject * obj1 = 0 ;
24260 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_PCAMatrix",&obj0,&obj1)) SWIG_fail;
24261 ecode1 = SWIG_AsVal_int(obj0, &val1);
24262 if (!SWIG_IsOK(ecode1)) {
24263 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24265 arg1 =
static_cast< int >(val1);
24266 ecode2 = SWIG_AsVal_int(obj1, &val2);
24267 if (!SWIG_IsOK(ecode2)) {
24268 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24270 arg2 =
static_cast< int >(val2);
24272 Py_BEGIN_ALLOW_THREADS
24276 PyEval_RestoreThread(_save);
24278 if (PyErr_Occurred()) {
24281 PyErr_SetString(PyExc_RuntimeError, e.
what());
24285 Py_END_ALLOW_THREADS
24287 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24294 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24295 PyObject *resultobj = 0;
24299 PyObject * obj0 = 0 ;
24302 if (!PyArg_ParseTuple(args,(
char *)
"O:new_PCAMatrix",&obj0)) SWIG_fail;
24303 ecode1 = SWIG_AsVal_int(obj0, &val1);
24304 if (!SWIG_IsOK(ecode1)) {
24305 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24307 arg1 =
static_cast< int >(val1);
24309 Py_BEGIN_ALLOW_THREADS
24313 PyEval_RestoreThread(_save);
24315 if (PyErr_Occurred()) {
24318 PyErr_SetString(PyExc_RuntimeError, e.
what());
24322 Py_END_ALLOW_THREADS
24324 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24331 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_4(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24332 PyObject *resultobj = 0;
24335 if (!PyArg_ParseTuple(args,(
char *)
":new_PCAMatrix")) SWIG_fail;
24337 Py_BEGIN_ALLOW_THREADS
24341 PyEval_RestoreThread(_save);
24343 if (PyErr_Occurred()) {
24346 PyErr_SetString(PyExc_RuntimeError, e.
what());
24350 Py_END_ALLOW_THREADS
24352 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24359 SWIGINTERN PyObject *_wrap_new_PCAMatrix(PyObject *
self, PyObject *args) {
24361 PyObject *argv[5] = {
24366 if (!PyTuple_Check(args)) SWIG_fail;
24367 argc = args ? PyObject_Length(args) : 0;
24368 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
24369 argv[ii] = PyTuple_GET_ITEM(args,ii);
24372 return _wrap_new_PCAMatrix__SWIG_4(
self, args);
24377 int res = SWIG_AsVal_int(argv[0], NULL);
24378 _v = SWIG_CheckState(res);
24381 return _wrap_new_PCAMatrix__SWIG_3(
self, args);
24387 int res = SWIG_AsVal_int(argv[0], NULL);
24388 _v = SWIG_CheckState(res);
24392 int res = SWIG_AsVal_int(argv[1], NULL);
24393 _v = SWIG_CheckState(res);
24396 return _wrap_new_PCAMatrix__SWIG_2(
self, args);
24403 int res = SWIG_AsVal_int(argv[0], NULL);
24404 _v = SWIG_CheckState(res);
24408 int res = SWIG_AsVal_int(argv[1], NULL);
24409 _v = SWIG_CheckState(res);
24413 int res = SWIG_AsVal_float(argv[2], NULL);
24414 _v = SWIG_CheckState(res);
24417 return _wrap_new_PCAMatrix__SWIG_1(
self, args);
24425 int res = SWIG_AsVal_int(argv[0], NULL);
24426 _v = SWIG_CheckState(res);
24430 int res = SWIG_AsVal_int(argv[1], NULL);
24431 _v = SWIG_CheckState(res);
24435 int res = SWIG_AsVal_float(argv[2], NULL);
24436 _v = SWIG_CheckState(res);
24440 int res = SWIG_AsVal_bool(argv[3], NULL);
24441 _v = SWIG_CheckState(res);
24444 return _wrap_new_PCAMatrix__SWIG_0(
self, args);
24452 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_PCAMatrix'.\n"
24453 " Possible C/C++ prototypes are:\n"
24454 " faiss::PCAMatrix::PCAMatrix(int,int,float,bool)\n"
24455 " faiss::PCAMatrix::PCAMatrix(int,int,float)\n"
24456 " faiss::PCAMatrix::PCAMatrix(int,int)\n"
24457 " faiss::PCAMatrix::PCAMatrix(int)\n"
24458 " faiss::PCAMatrix::PCAMatrix()\n");
24463 SWIGINTERN PyObject *_wrap_PCAMatrix_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24464 PyObject *resultobj = 0;
24467 float *arg3 = (
float *) 0 ;
24474 PyObject * obj0 = 0 ;
24475 PyObject * obj1 = 0 ;
24476 PyObject * obj2 = 0 ;
24478 if (!PyArg_ParseTuple(args,(
char *)
"OOO:PCAMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
24479 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24480 if (!SWIG_IsOK(res1)) {
24481 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_train" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24484 ecode2 = SWIG_AsVal_long(obj1, &val2);
24485 if (!SWIG_IsOK(ecode2)) {
24486 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "PCAMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
24489 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24490 if (!SWIG_IsOK(res3)) {
24491 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "PCAMatrix_train" "', argument " "3"" of type '" "float const *""'");
24493 arg3 =
reinterpret_cast< float *
>(argp3);
24495 Py_BEGIN_ALLOW_THREADS
24497 (arg1)->train(arg2,(
float const *)arg3);
24499 PyEval_RestoreThread(_save);
24501 if (PyErr_Occurred()) {
24504 PyErr_SetString(PyExc_RuntimeError, e.
what());
24508 Py_END_ALLOW_THREADS
24510 resultobj = SWIG_Py_Void();
24517 SWIGINTERN PyObject *_wrap_PCAMatrix_copy_from(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24518 PyObject *resultobj = 0;
24525 PyObject * obj0 = 0 ;
24526 PyObject * obj1 = 0 ;
24528 if (!PyArg_ParseTuple(args,(
char *)
"OO:PCAMatrix_copy_from",&obj0,&obj1)) SWIG_fail;
24529 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24530 if (!SWIG_IsOK(res1)) {
24531 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_copy_from" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24534 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__PCAMatrix, 0 | 0);
24535 if (!SWIG_IsOK(res2)) {
24536 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
24539 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
24543 Py_BEGIN_ALLOW_THREADS
24547 PyEval_RestoreThread(_save);
24549 if (PyErr_Occurred()) {
24552 PyErr_SetString(PyExc_RuntimeError, e.
what());
24556 Py_END_ALLOW_THREADS
24558 resultobj = SWIG_Py_Void();
24565 SWIGINTERN PyObject *_wrap_PCAMatrix_prepare_Ab(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24566 PyObject *resultobj = 0;
24570 PyObject * obj0 = 0 ;
24572 if (!PyArg_ParseTuple(args,(
char *)
"O:PCAMatrix_prepare_Ab",&obj0)) SWIG_fail;
24573 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24574 if (!SWIG_IsOK(res1)) {
24575 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "PCAMatrix_prepare_Ab" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24579 Py_BEGIN_ALLOW_THREADS
24581 (arg1)->prepare_Ab();
24583 PyEval_RestoreThread(_save);
24585 if (PyErr_Occurred()) {
24588 PyErr_SetString(PyExc_RuntimeError, e.
what());
24592 Py_END_ALLOW_THREADS
24594 resultobj = SWIG_Py_Void();
24601 SWIGINTERN PyObject *_wrap_delete_PCAMatrix(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24602 PyObject *resultobj = 0;
24606 PyObject * obj0 = 0 ;
24608 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_PCAMatrix",&obj0)) SWIG_fail;
24609 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_DISOWN | 0 );
24610 if (!SWIG_IsOK(res1)) {
24611 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_PCAMatrix" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24615 resultobj = SWIG_Py_Void();
24622 SWIGINTERN PyObject *PCAMatrix_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24624 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
24625 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PCAMatrix, SWIG_NewClientData(obj));
24626 return SWIG_Py_Void();
24629 SWIGINTERN PyObject *_wrap_OPQMatrix_M_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24630 PyObject *resultobj = 0;
24637 PyObject * obj0 = 0 ;
24638 PyObject * obj1 = 0 ;
24640 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_M_set",&obj0,&obj1)) SWIG_fail;
24641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24642 if (!SWIG_IsOK(res1)) {
24643 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_M_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24646 ecode2 = SWIG_AsVal_int(obj1, &val2);
24647 if (!SWIG_IsOK(ecode2)) {
24648 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_M_set" "', argument " "2"" of type '" "int""'");
24650 arg2 =
static_cast< int >(val2);
24651 if (arg1) (arg1)->M = arg2;
24652 resultobj = SWIG_Py_Void();
24659 SWIGINTERN PyObject *_wrap_OPQMatrix_M_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24660 PyObject *resultobj = 0;
24664 PyObject * obj0 = 0 ;
24667 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_M_get",&obj0)) SWIG_fail;
24668 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24669 if (!SWIG_IsOK(res1)) {
24670 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_M_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24673 result = (int) ((arg1)->M);
24674 resultobj = SWIG_From_int(static_cast< int >(result));
24681 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24682 PyObject *resultobj = 0;
24689 PyObject * obj0 = 0 ;
24690 PyObject * obj1 = 0 ;
24692 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_niter_set",&obj0,&obj1)) SWIG_fail;
24693 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24694 if (!SWIG_IsOK(res1)) {
24695 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24698 ecode2 = SWIG_AsVal_int(obj1, &val2);
24699 if (!SWIG_IsOK(ecode2)) {
24700 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_niter_set" "', argument " "2"" of type '" "int""'");
24702 arg2 =
static_cast< int >(val2);
24703 if (arg1) (arg1)->niter = arg2;
24704 resultobj = SWIG_Py_Void();
24711 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24712 PyObject *resultobj = 0;
24716 PyObject * obj0 = 0 ;
24719 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_niter_get",&obj0)) SWIG_fail;
24720 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24721 if (!SWIG_IsOK(res1)) {
24722 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24725 result = (int) ((arg1)->niter);
24726 resultobj = SWIG_From_int(static_cast< int >(result));
24733 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24734 PyObject *resultobj = 0;
24741 PyObject * obj0 = 0 ;
24742 PyObject * obj1 = 0 ;
24744 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_niter_pq_set",&obj0,&obj1)) SWIG_fail;
24745 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24746 if (!SWIG_IsOK(res1)) {
24747 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24750 ecode2 = SWIG_AsVal_int(obj1, &val2);
24751 if (!SWIG_IsOK(ecode2)) {
24752 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_niter_pq_set" "', argument " "2"" of type '" "int""'");
24754 arg2 =
static_cast< int >(val2);
24755 if (arg1) (arg1)->niter_pq = arg2;
24756 resultobj = SWIG_Py_Void();
24763 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24764 PyObject *resultobj = 0;
24768 PyObject * obj0 = 0 ;
24771 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_niter_pq_get",&obj0)) SWIG_fail;
24772 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24773 if (!SWIG_IsOK(res1)) {
24774 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24777 result = (int) ((arg1)->niter_pq);
24778 resultobj = SWIG_From_int(static_cast< int >(result));
24785 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24786 PyObject *resultobj = 0;
24793 PyObject * obj0 = 0 ;
24794 PyObject * obj1 = 0 ;
24796 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_niter_pq_0_set",&obj0,&obj1)) SWIG_fail;
24797 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24798 if (!SWIG_IsOK(res1)) {
24799 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_pq_0_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24802 ecode2 = SWIG_AsVal_int(obj1, &val2);
24803 if (!SWIG_IsOK(ecode2)) {
24804 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_niter_pq_0_set" "', argument " "2"" of type '" "int""'");
24806 arg2 =
static_cast< int >(val2);
24807 if (arg1) (arg1)->niter_pq_0 = arg2;
24808 resultobj = SWIG_Py_Void();
24815 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24816 PyObject *resultobj = 0;
24820 PyObject * obj0 = 0 ;
24823 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_niter_pq_0_get",&obj0)) SWIG_fail;
24824 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24825 if (!SWIG_IsOK(res1)) {
24826 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_niter_pq_0_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24829 result = (int) ((arg1)->niter_pq_0);
24830 resultobj = SWIG_From_int(static_cast< int >(result));
24837 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24838 PyObject *resultobj = 0;
24845 PyObject * obj0 = 0 ;
24846 PyObject * obj1 = 0 ;
24848 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_max_train_points_set",&obj0,&obj1)) SWIG_fail;
24849 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24850 if (!SWIG_IsOK(res1)) {
24851 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_max_train_points_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24854 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
24855 if (!SWIG_IsOK(ecode2)) {
24856 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_max_train_points_set" "', argument " "2"" of type '" "size_t""'");
24858 arg2 =
static_cast< size_t >(val2);
24859 if (arg1) (arg1)->max_train_points = arg2;
24860 resultobj = SWIG_Py_Void();
24867 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24868 PyObject *resultobj = 0;
24872 PyObject * obj0 = 0 ;
24875 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_max_train_points_get",&obj0)) SWIG_fail;
24876 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24877 if (!SWIG_IsOK(res1)) {
24878 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_max_train_points_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24881 result = (size_t) ((arg1)->max_train_points);
24882 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
24889 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24890 PyObject *resultobj = 0;
24897 PyObject * obj0 = 0 ;
24898 PyObject * obj1 = 0 ;
24900 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_verbose_set",&obj0,&obj1)) SWIG_fail;
24901 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24902 if (!SWIG_IsOK(res1)) {
24903 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_verbose_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24906 ecode2 = SWIG_AsVal_bool(obj1, &val2);
24907 if (!SWIG_IsOK(ecode2)) {
24908 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_verbose_set" "', argument " "2"" of type '" "bool""'");
24910 arg2 =
static_cast< bool >(val2);
24911 if (arg1) (arg1)->verbose = arg2;
24912 resultobj = SWIG_Py_Void();
24919 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24920 PyObject *resultobj = 0;
24924 PyObject * obj0 = 0 ;
24927 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_verbose_get",&obj0)) SWIG_fail;
24928 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24929 if (!SWIG_IsOK(res1)) {
24930 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_verbose_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24933 result = (bool) ((arg1)->verbose);
24934 resultobj = SWIG_From_bool(static_cast< bool >(result));
24941 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24942 PyObject *resultobj = 0;
24949 PyObject * obj0 = 0 ;
24950 PyObject * obj1 = 0 ;
24952 if (!PyArg_ParseTuple(args,(
char *)
"OO:OPQMatrix_pq_set",&obj0,&obj1)) SWIG_fail;
24953 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24954 if (!SWIG_IsOK(res1)) {
24955 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24958 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
24959 if (!SWIG_IsOK(res2)) {
24960 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "OPQMatrix_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
24963 if (arg1) (arg1)->pq = arg2;
24964 resultobj = SWIG_Py_Void();
24971 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24972 PyObject *resultobj = 0;
24976 PyObject * obj0 = 0 ;
24979 if (!PyArg_ParseTuple(args,(
char *)
"O:OPQMatrix_pq_get",&obj0)) SWIG_fail;
24980 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24981 if (!SWIG_IsOK(res1)) {
24982 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24986 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
24993 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
24994 PyObject *resultobj = 0;
25004 PyObject * obj0 = 0 ;
25005 PyObject * obj1 = 0 ;
25006 PyObject * obj2 = 0 ;
25009 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_OPQMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
25010 ecode1 = SWIG_AsVal_int(obj0, &val1);
25011 if (!SWIG_IsOK(ecode1)) {
25012 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25014 arg1 =
static_cast< int >(val1);
25015 ecode2 = SWIG_AsVal_int(obj1, &val2);
25016 if (!SWIG_IsOK(ecode2)) {
25017 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
25019 arg2 =
static_cast< int >(val2);
25020 ecode3 = SWIG_AsVal_int(obj2, &val3);
25021 if (!SWIG_IsOK(ecode3)) {
25022 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_OPQMatrix" "', argument " "3"" of type '" "int""'");
25024 arg3 =
static_cast< int >(val3);
25026 Py_BEGIN_ALLOW_THREADS
25030 PyEval_RestoreThread(_save);
25032 if (PyErr_Occurred()) {
25035 PyErr_SetString(PyExc_RuntimeError, e.
what());
25039 Py_END_ALLOW_THREADS
25041 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25048 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25049 PyObject *resultobj = 0;
25056 PyObject * obj0 = 0 ;
25057 PyObject * obj1 = 0 ;
25060 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_OPQMatrix",&obj0,&obj1)) SWIG_fail;
25061 ecode1 = SWIG_AsVal_int(obj0, &val1);
25062 if (!SWIG_IsOK(ecode1)) {
25063 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25065 arg1 =
static_cast< int >(val1);
25066 ecode2 = SWIG_AsVal_int(obj1, &val2);
25067 if (!SWIG_IsOK(ecode2)) {
25068 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
25070 arg2 =
static_cast< int >(val2);
25072 Py_BEGIN_ALLOW_THREADS
25076 PyEval_RestoreThread(_save);
25078 if (PyErr_Occurred()) {
25081 PyErr_SetString(PyExc_RuntimeError, e.
what());
25085 Py_END_ALLOW_THREADS
25087 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25094 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25095 PyObject *resultobj = 0;
25099 PyObject * obj0 = 0 ;
25102 if (!PyArg_ParseTuple(args,(
char *)
"O:new_OPQMatrix",&obj0)) SWIG_fail;
25103 ecode1 = SWIG_AsVal_int(obj0, &val1);
25104 if (!SWIG_IsOK(ecode1)) {
25105 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25107 arg1 =
static_cast< int >(val1);
25109 Py_BEGIN_ALLOW_THREADS
25113 PyEval_RestoreThread(_save);
25115 if (PyErr_Occurred()) {
25118 PyErr_SetString(PyExc_RuntimeError, e.
what());
25122 Py_END_ALLOW_THREADS
25124 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25131 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25132 PyObject *resultobj = 0;
25135 if (!PyArg_ParseTuple(args,(
char *)
":new_OPQMatrix")) SWIG_fail;
25137 Py_BEGIN_ALLOW_THREADS
25141 PyEval_RestoreThread(_save);
25143 if (PyErr_Occurred()) {
25146 PyErr_SetString(PyExc_RuntimeError, e.
what());
25150 Py_END_ALLOW_THREADS
25152 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25159 SWIGINTERN PyObject *_wrap_new_OPQMatrix(PyObject *
self, PyObject *args) {
25161 PyObject *argv[4] = {
25166 if (!PyTuple_Check(args)) SWIG_fail;
25167 argc = args ? PyObject_Length(args) : 0;
25168 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
25169 argv[ii] = PyTuple_GET_ITEM(args,ii);
25172 return _wrap_new_OPQMatrix__SWIG_3(
self, args);
25177 int res = SWIG_AsVal_int(argv[0], NULL);
25178 _v = SWIG_CheckState(res);
25181 return _wrap_new_OPQMatrix__SWIG_2(
self, args);
25187 int res = SWIG_AsVal_int(argv[0], NULL);
25188 _v = SWIG_CheckState(res);
25192 int res = SWIG_AsVal_int(argv[1], NULL);
25193 _v = SWIG_CheckState(res);
25196 return _wrap_new_OPQMatrix__SWIG_1(
self, args);
25203 int res = SWIG_AsVal_int(argv[0], NULL);
25204 _v = SWIG_CheckState(res);
25208 int res = SWIG_AsVal_int(argv[1], NULL);
25209 _v = SWIG_CheckState(res);
25213 int res = SWIG_AsVal_int(argv[2], NULL);
25214 _v = SWIG_CheckState(res);
25217 return _wrap_new_OPQMatrix__SWIG_0(
self, args);
25224 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_OPQMatrix'.\n"
25225 " Possible C/C++ prototypes are:\n"
25226 " faiss::OPQMatrix::OPQMatrix(int,int,int)\n"
25227 " faiss::OPQMatrix::OPQMatrix(int,int)\n"
25228 " faiss::OPQMatrix::OPQMatrix(int)\n"
25229 " faiss::OPQMatrix::OPQMatrix()\n");
25234 SWIGINTERN PyObject *_wrap_OPQMatrix_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25235 PyObject *resultobj = 0;
25238 float *arg3 = (
float *) 0 ;
25245 PyObject * obj0 = 0 ;
25246 PyObject * obj1 = 0 ;
25247 PyObject * obj2 = 0 ;
25249 if (!PyArg_ParseTuple(args,(
char *)
"OOO:OPQMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
25250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25251 if (!SWIG_IsOK(res1)) {
25252 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "OPQMatrix_train" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25255 ecode2 = SWIG_AsVal_long(obj1, &val2);
25256 if (!SWIG_IsOK(ecode2)) {
25257 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "OPQMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25260 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25261 if (!SWIG_IsOK(res3)) {
25262 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "OPQMatrix_train" "', argument " "3"" of type '" "float const *""'");
25264 arg3 =
reinterpret_cast< float *
>(argp3);
25266 Py_BEGIN_ALLOW_THREADS
25268 (arg1)->train(arg2,(
float const *)arg3);
25270 PyEval_RestoreThread(_save);
25272 if (PyErr_Occurred()) {
25275 PyErr_SetString(PyExc_RuntimeError, e.
what());
25279 Py_END_ALLOW_THREADS
25281 resultobj = SWIG_Py_Void();
25288 SWIGINTERN PyObject *_wrap_delete_OPQMatrix(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25289 PyObject *resultobj = 0;
25293 PyObject * obj0 = 0 ;
25295 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_OPQMatrix",&obj0)) SWIG_fail;
25296 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_DISOWN | 0 );
25297 if (!SWIG_IsOK(res1)) {
25298 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_OPQMatrix" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25302 resultobj = SWIG_Py_Void();
25309 SWIGINTERN PyObject *OPQMatrix_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25311 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
25312 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OPQMatrix, SWIG_NewClientData(obj));
25313 return SWIG_Py_Void();
25316 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25317 PyObject *resultobj = 0;
25319 std::vector< int > *arg2 = (std::vector< int > *) 0 ;
25324 PyObject * obj0 = 0 ;
25325 PyObject * obj1 = 0 ;
25327 if (!PyArg_ParseTuple(args,(
char *)
"OO:RemapDimensionsTransform_map_set",&obj0,&obj1)) SWIG_fail;
25328 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25329 if (!SWIG_IsOK(res1)) {
25330 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RemapDimensionsTransform_map_set" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25333 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
25334 if (!SWIG_IsOK(res2)) {
25335 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "RemapDimensionsTransform_map_set" "', argument " "2"" of type '" "std::vector< int > *""'");
25337 arg2 =
reinterpret_cast< std::vector< int > *
>(argp2);
25338 if (arg1) (arg1)->map = *arg2;
25339 resultobj = SWIG_Py_Void();
25346 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25347 PyObject *resultobj = 0;
25351 PyObject * obj0 = 0 ;
25352 std::vector< int > *result = 0 ;
25354 if (!PyArg_ParseTuple(args,(
char *)
"O:RemapDimensionsTransform_map_get",&obj0)) SWIG_fail;
25355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25356 if (!SWIG_IsOK(res1)) {
25357 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RemapDimensionsTransform_map_get" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25360 result = (std::vector< int > *)& ((arg1)->map);
25361 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
25368 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25369 PyObject *resultobj = 0;
25372 int *arg3 = (
int *) 0 ;
25379 PyObject * obj0 = 0 ;
25380 PyObject * obj1 = 0 ;
25381 PyObject * obj2 = 0 ;
25384 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
25385 ecode1 = SWIG_AsVal_int(obj0, &val1);
25386 if (!SWIG_IsOK(ecode1)) {
25387 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25389 arg1 =
static_cast< int >(val1);
25390 ecode2 = SWIG_AsVal_int(obj1, &val2);
25391 if (!SWIG_IsOK(ecode2)) {
25392 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25394 arg2 =
static_cast< int >(val2);
25395 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
25396 if (!SWIG_IsOK(res3)) {
25397 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "int const *""'");
25399 arg3 =
reinterpret_cast< int *
>(argp3);
25401 Py_BEGIN_ALLOW_THREADS
25405 PyEval_RestoreThread(_save);
25407 if (PyErr_Occurred()) {
25410 PyErr_SetString(PyExc_RuntimeError, e.
what());
25414 Py_END_ALLOW_THREADS
25416 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25423 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25424 PyObject *resultobj = 0;
25434 PyObject * obj0 = 0 ;
25435 PyObject * obj1 = 0 ;
25436 PyObject * obj2 = 0 ;
25439 if (!PyArg_ParseTuple(args,(
char *)
"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
25440 ecode1 = SWIG_AsVal_int(obj0, &val1);
25441 if (!SWIG_IsOK(ecode1)) {
25442 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25444 arg1 =
static_cast< int >(val1);
25445 ecode2 = SWIG_AsVal_int(obj1, &val2);
25446 if (!SWIG_IsOK(ecode2)) {
25447 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25449 arg2 =
static_cast< int >(val2);
25450 ecode3 = SWIG_AsVal_bool(obj2, &val3);
25451 if (!SWIG_IsOK(ecode3)) {
25452 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "bool""'");
25454 arg3 =
static_cast< bool >(val3);
25456 Py_BEGIN_ALLOW_THREADS
25460 PyEval_RestoreThread(_save);
25462 if (PyErr_Occurred()) {
25465 PyErr_SetString(PyExc_RuntimeError, e.
what());
25469 Py_END_ALLOW_THREADS
25471 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25478 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25479 PyObject *resultobj = 0;
25486 PyObject * obj0 = 0 ;
25487 PyObject * obj1 = 0 ;
25490 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_RemapDimensionsTransform",&obj0,&obj1)) SWIG_fail;
25491 ecode1 = SWIG_AsVal_int(obj0, &val1);
25492 if (!SWIG_IsOK(ecode1)) {
25493 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25495 arg1 =
static_cast< int >(val1);
25496 ecode2 = SWIG_AsVal_int(obj1, &val2);
25497 if (!SWIG_IsOK(ecode2)) {
25498 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25500 arg2 =
static_cast< int >(val2);
25502 Py_BEGIN_ALLOW_THREADS
25506 PyEval_RestoreThread(_save);
25508 if (PyErr_Occurred()) {
25511 PyErr_SetString(PyExc_RuntimeError, e.
what());
25515 Py_END_ALLOW_THREADS
25517 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25524 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25525 PyObject *resultobj = 0;
25527 faiss::VectorTransform::idx_t arg2 ;
25528 float *arg3 = (
float *) 0 ;
25529 float *arg4 = (
float *) 0 ;
25538 PyObject * obj0 = 0 ;
25539 PyObject * obj1 = 0 ;
25540 PyObject * obj2 = 0 ;
25541 PyObject * obj3 = 0 ;
25543 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:RemapDimensionsTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25544 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25545 if (!SWIG_IsOK(res1)) {
25546 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
25549 ecode2 = SWIG_AsVal_long(obj1, &val2);
25550 if (!SWIG_IsOK(ecode2)) {
25551 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
25553 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
25554 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25555 if (!SWIG_IsOK(res3)) {
25556 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
25558 arg3 =
reinterpret_cast< float *
>(argp3);
25559 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25560 if (!SWIG_IsOK(res4)) {
25561 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
25563 arg4 =
reinterpret_cast< float *
>(argp4);
25565 Py_BEGIN_ALLOW_THREADS
25569 PyEval_RestoreThread(_save);
25571 if (PyErr_Occurred()) {
25574 PyErr_SetString(PyExc_RuntimeError, e.
what());
25578 Py_END_ALLOW_THREADS
25580 resultobj = SWIG_Py_Void();
25587 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25588 PyObject *resultobj = 0;
25590 faiss::VectorTransform::idx_t arg2 ;
25591 float *arg3 = (
float *) 0 ;
25592 float *arg4 = (
float *) 0 ;
25601 PyObject * obj0 = 0 ;
25602 PyObject * obj1 = 0 ;
25603 PyObject * obj2 = 0 ;
25604 PyObject * obj3 = 0 ;
25606 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:RemapDimensionsTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25607 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25608 if (!SWIG_IsOK(res1)) {
25609 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
25612 ecode2 = SWIG_AsVal_long(obj1, &val2);
25613 if (!SWIG_IsOK(ecode2)) {
25614 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
25616 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
25617 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25618 if (!SWIG_IsOK(res3)) {
25619 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
25621 arg3 =
reinterpret_cast< float *
>(argp3);
25622 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25623 if (!SWIG_IsOK(res4)) {
25624 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
25626 arg4 =
reinterpret_cast< float *
>(argp4);
25628 Py_BEGIN_ALLOW_THREADS
25632 PyEval_RestoreThread(_save);
25634 if (PyErr_Occurred()) {
25637 PyErr_SetString(PyExc_RuntimeError, e.
what());
25641 Py_END_ALLOW_THREADS
25643 resultobj = SWIG_Py_Void();
25650 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25651 PyObject *resultobj = 0;
25654 if (!PyArg_ParseTuple(args,(
char *)
":new_RemapDimensionsTransform")) SWIG_fail;
25656 Py_BEGIN_ALLOW_THREADS
25660 PyEval_RestoreThread(_save);
25662 if (PyErr_Occurred()) {
25665 PyErr_SetString(PyExc_RuntimeError, e.
what());
25669 Py_END_ALLOW_THREADS
25671 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25678 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform(PyObject *
self, PyObject *args) {
25680 PyObject *argv[4] = {
25685 if (!PyTuple_Check(args)) SWIG_fail;
25686 argc = args ? PyObject_Length(args) : 0;
25687 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
25688 argv[ii] = PyTuple_GET_ITEM(args,ii);
25691 return _wrap_new_RemapDimensionsTransform__SWIG_3(
self, args);
25696 int res = SWIG_AsVal_int(argv[0], NULL);
25697 _v = SWIG_CheckState(res);
25701 int res = SWIG_AsVal_int(argv[1], NULL);
25702 _v = SWIG_CheckState(res);
25705 return _wrap_new_RemapDimensionsTransform__SWIG_2(
self, args);
25712 int res = SWIG_AsVal_int(argv[0], NULL);
25713 _v = SWIG_CheckState(res);
25717 int res = SWIG_AsVal_int(argv[1], NULL);
25718 _v = SWIG_CheckState(res);
25722 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
25723 _v = SWIG_CheckState(res);
25725 return _wrap_new_RemapDimensionsTransform__SWIG_0(
self, args);
25733 int res = SWIG_AsVal_int(argv[0], NULL);
25734 _v = SWIG_CheckState(res);
25738 int res = SWIG_AsVal_int(argv[1], NULL);
25739 _v = SWIG_CheckState(res);
25743 int res = SWIG_AsVal_bool(argv[2], NULL);
25744 _v = SWIG_CheckState(res);
25747 return _wrap_new_RemapDimensionsTransform__SWIG_1(
self, args);
25754 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_RemapDimensionsTransform'.\n"
25755 " Possible C/C++ prototypes are:\n"
25756 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,int const *)\n"
25757 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,bool)\n"
25758 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int)\n"
25759 " faiss::RemapDimensionsTransform::RemapDimensionsTransform()\n");
25764 SWIGINTERN PyObject *_wrap_delete_RemapDimensionsTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25765 PyObject *resultobj = 0;
25769 PyObject * obj0 = 0 ;
25771 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_RemapDimensionsTransform",&obj0)) SWIG_fail;
25772 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_DISOWN | 0 );
25773 if (!SWIG_IsOK(res1)) {
25774 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_RemapDimensionsTransform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25778 resultobj = SWIG_Py_Void();
25785 SWIGINTERN PyObject *RemapDimensionsTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25787 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
25788 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_NewClientData(obj));
25789 return SWIG_Py_Void();
25792 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25793 PyObject *resultobj = 0;
25800 PyObject * obj0 = 0 ;
25801 PyObject * obj1 = 0 ;
25803 if (!PyArg_ParseTuple(args,(
char *)
"OO:NormalizationTransform_norm_set",&obj0,&obj1)) SWIG_fail;
25804 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
25805 if (!SWIG_IsOK(res1)) {
25806 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "NormalizationTransform_norm_set" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
25809 ecode2 = SWIG_AsVal_float(obj1, &val2);
25810 if (!SWIG_IsOK(ecode2)) {
25811 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "NormalizationTransform_norm_set" "', argument " "2"" of type '" "float""'");
25813 arg2 =
static_cast< float >(val2);
25814 if (arg1) (arg1)->norm = arg2;
25815 resultobj = SWIG_Py_Void();
25822 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25823 PyObject *resultobj = 0;
25827 PyObject * obj0 = 0 ;
25830 if (!PyArg_ParseTuple(args,(
char *)
"O:NormalizationTransform_norm_get",&obj0)) SWIG_fail;
25831 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
25832 if (!SWIG_IsOK(res1)) {
25833 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "NormalizationTransform_norm_get" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
25836 result = (float) ((arg1)->norm);
25837 resultobj = SWIG_From_float(static_cast< float >(result));
25844 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25845 PyObject *resultobj = 0;
25852 PyObject * obj0 = 0 ;
25853 PyObject * obj1 = 0 ;
25856 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_NormalizationTransform",&obj0,&obj1)) SWIG_fail;
25857 ecode1 = SWIG_AsVal_int(obj0, &val1);
25858 if (!SWIG_IsOK(ecode1)) {
25859 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
25861 arg1 =
static_cast< int >(val1);
25862 ecode2 = SWIG_AsVal_float(obj1, &val2);
25863 if (!SWIG_IsOK(ecode2)) {
25864 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_NormalizationTransform" "', argument " "2"" of type '" "float""'");
25866 arg2 =
static_cast< float >(val2);
25868 Py_BEGIN_ALLOW_THREADS
25872 PyEval_RestoreThread(_save);
25874 if (PyErr_Occurred()) {
25877 PyErr_SetString(PyExc_RuntimeError, e.
what());
25881 Py_END_ALLOW_THREADS
25883 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
25890 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25891 PyObject *resultobj = 0;
25895 PyObject * obj0 = 0 ;
25898 if (!PyArg_ParseTuple(args,(
char *)
"O:new_NormalizationTransform",&obj0)) SWIG_fail;
25899 ecode1 = SWIG_AsVal_int(obj0, &val1);
25900 if (!SWIG_IsOK(ecode1)) {
25901 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
25903 arg1 =
static_cast< int >(val1);
25905 Py_BEGIN_ALLOW_THREADS
25909 PyEval_RestoreThread(_save);
25911 if (PyErr_Occurred()) {
25914 PyErr_SetString(PyExc_RuntimeError, e.
what());
25918 Py_END_ALLOW_THREADS
25920 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
25927 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
25928 PyObject *resultobj = 0;
25931 if (!PyArg_ParseTuple(args,(
char *)
":new_NormalizationTransform")) SWIG_fail;
25933 Py_BEGIN_ALLOW_THREADS
25937 PyEval_RestoreThread(_save);
25939 if (PyErr_Occurred()) {
25942 PyErr_SetString(PyExc_RuntimeError, e.
what());
25946 Py_END_ALLOW_THREADS
25948 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
25955 SWIGINTERN PyObject *_wrap_new_NormalizationTransform(PyObject *
self, PyObject *args) {
25957 PyObject *argv[3] = {
25962 if (!PyTuple_Check(args)) SWIG_fail;
25963 argc = args ? PyObject_Length(args) : 0;
25964 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
25965 argv[ii] = PyTuple_GET_ITEM(args,ii);
25968 return _wrap_new_NormalizationTransform__SWIG_2(
self, args);
25973 int res = SWIG_AsVal_int(argv[0], NULL);
25974 _v = SWIG_CheckState(res);
25977 return _wrap_new_NormalizationTransform__SWIG_1(
self, args);
25983 int res = SWIG_AsVal_int(argv[0], NULL);
25984 _v = SWIG_CheckState(res);
25988 int res = SWIG_AsVal_float(argv[1], NULL);
25989 _v = SWIG_CheckState(res);
25992 return _wrap_new_NormalizationTransform__SWIG_0(
self, args);
25998 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_NormalizationTransform'.\n"
25999 " Possible C/C++ prototypes are:\n"
26000 " faiss::NormalizationTransform::NormalizationTransform(int,float)\n"
26001 " faiss::NormalizationTransform::NormalizationTransform(int)\n"
26002 " faiss::NormalizationTransform::NormalizationTransform()\n");
26007 SWIGINTERN PyObject *_wrap_NormalizationTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26008 PyObject *resultobj = 0;
26010 faiss::VectorTransform::idx_t arg2 ;
26011 float *arg3 = (
float *) 0 ;
26012 float *arg4 = (
float *) 0 ;
26021 PyObject * obj0 = 0 ;
26022 PyObject * obj1 = 0 ;
26023 PyObject * obj2 = 0 ;
26024 PyObject * obj3 = 0 ;
26026 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:NormalizationTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26027 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
26028 if (!SWIG_IsOK(res1)) {
26029 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "NormalizationTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
26032 ecode2 = SWIG_AsVal_long(obj1, &val2);
26033 if (!SWIG_IsOK(ecode2)) {
26034 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "NormalizationTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26036 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
26037 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26038 if (!SWIG_IsOK(res3)) {
26039 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "NormalizationTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
26041 arg3 =
reinterpret_cast< float *
>(argp3);
26042 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26043 if (!SWIG_IsOK(res4)) {
26044 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "NormalizationTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
26046 arg4 =
reinterpret_cast< float *
>(argp4);
26048 Py_BEGIN_ALLOW_THREADS
26052 PyEval_RestoreThread(_save);
26054 if (PyErr_Occurred()) {
26057 PyErr_SetString(PyExc_RuntimeError, e.
what());
26061 Py_END_ALLOW_THREADS
26063 resultobj = SWIG_Py_Void();
26070 SWIGINTERN PyObject *_wrap_NormalizationTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26071 PyObject *resultobj = 0;
26073 faiss::VectorTransform::idx_t arg2 ;
26074 float *arg3 = (
float *) 0 ;
26075 float *arg4 = (
float *) 0 ;
26084 PyObject * obj0 = 0 ;
26085 PyObject * obj1 = 0 ;
26086 PyObject * obj2 = 0 ;
26087 PyObject * obj3 = 0 ;
26089 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:NormalizationTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26090 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
26091 if (!SWIG_IsOK(res1)) {
26092 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "NormalizationTransform_reverse_transform" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
26095 ecode2 = SWIG_AsVal_long(obj1, &val2);
26096 if (!SWIG_IsOK(ecode2)) {
26097 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "NormalizationTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26099 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
26100 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26101 if (!SWIG_IsOK(res3)) {
26102 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "NormalizationTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
26104 arg3 =
reinterpret_cast< float *
>(argp3);
26105 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26106 if (!SWIG_IsOK(res4)) {
26107 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "NormalizationTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
26109 arg4 =
reinterpret_cast< float *
>(argp4);
26111 Py_BEGIN_ALLOW_THREADS
26115 PyEval_RestoreThread(_save);
26117 if (PyErr_Occurred()) {
26120 PyErr_SetString(PyExc_RuntimeError, e.
what());
26124 Py_END_ALLOW_THREADS
26126 resultobj = SWIG_Py_Void();
26133 SWIGINTERN PyObject *_wrap_delete_NormalizationTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26134 PyObject *resultobj = 0;
26138 PyObject * obj0 = 0 ;
26140 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_NormalizationTransform",&obj0)) SWIG_fail;
26141 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_DISOWN | 0 );
26142 if (!SWIG_IsOK(res1)) {
26143 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_NormalizationTransform" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
26147 resultobj = SWIG_Py_Void();
26154 SWIGINTERN PyObject *NormalizationTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26156 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
26157 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__NormalizationTransform, SWIG_NewClientData(obj));
26158 return SWIG_Py_Void();
26161 SWIGINTERN PyObject *_wrap_CenteringTransform_mean_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26162 PyObject *resultobj = 0;
26164 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
26169 PyObject * obj0 = 0 ;
26170 PyObject * obj1 = 0 ;
26172 if (!PyArg_ParseTuple(args,(
char *)
"OO:CenteringTransform_mean_set",&obj0,&obj1)) SWIG_fail;
26173 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, 0 | 0 );
26174 if (!SWIG_IsOK(res1)) {
26175 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CenteringTransform_mean_set" "', argument " "1"" of type '" "faiss::CenteringTransform *""'");
26178 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
26179 if (!SWIG_IsOK(res2)) {
26180 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "CenteringTransform_mean_set" "', argument " "2"" of type '" "std::vector< float > *""'");
26182 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
26183 if (arg1) (arg1)->mean = *arg2;
26184 resultobj = SWIG_Py_Void();
26191 SWIGINTERN PyObject *_wrap_CenteringTransform_mean_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26192 PyObject *resultobj = 0;
26196 PyObject * obj0 = 0 ;
26197 std::vector< float > *result = 0 ;
26199 if (!PyArg_ParseTuple(args,(
char *)
"O:CenteringTransform_mean_get",&obj0)) SWIG_fail;
26200 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, 0 | 0 );
26201 if (!SWIG_IsOK(res1)) {
26202 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CenteringTransform_mean_get" "', argument " "1"" of type '" "faiss::CenteringTransform *""'");
26205 result = (std::vector< float > *)& ((arg1)->mean);
26206 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
26213 SWIGINTERN PyObject *_wrap_new_CenteringTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26214 PyObject *resultobj = 0;
26218 PyObject * obj0 = 0 ;
26221 if (!PyArg_ParseTuple(args,(
char *)
"O:new_CenteringTransform",&obj0)) SWIG_fail;
26222 ecode1 = SWIG_AsVal_int(obj0, &val1);
26223 if (!SWIG_IsOK(ecode1)) {
26224 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_CenteringTransform" "', argument " "1"" of type '" "int""'");
26226 arg1 =
static_cast< int >(val1);
26228 Py_BEGIN_ALLOW_THREADS
26232 PyEval_RestoreThread(_save);
26234 if (PyErr_Occurred()) {
26237 PyErr_SetString(PyExc_RuntimeError, e.
what());
26241 Py_END_ALLOW_THREADS
26243 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__CenteringTransform, SWIG_POINTER_NEW | 0 );
26250 SWIGINTERN PyObject *_wrap_new_CenteringTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26251 PyObject *resultobj = 0;
26254 if (!PyArg_ParseTuple(args,(
char *)
":new_CenteringTransform")) SWIG_fail;
26256 Py_BEGIN_ALLOW_THREADS
26260 PyEval_RestoreThread(_save);
26262 if (PyErr_Occurred()) {
26265 PyErr_SetString(PyExc_RuntimeError, e.
what());
26269 Py_END_ALLOW_THREADS
26271 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__CenteringTransform, SWIG_POINTER_NEW | 0 );
26278 SWIGINTERN PyObject *_wrap_new_CenteringTransform(PyObject *
self, PyObject *args) {
26280 PyObject *argv[2] = {
26285 if (!PyTuple_Check(args)) SWIG_fail;
26286 argc = args ? PyObject_Length(args) : 0;
26287 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
26288 argv[ii] = PyTuple_GET_ITEM(args,ii);
26291 return _wrap_new_CenteringTransform__SWIG_1(
self, args);
26296 int res = SWIG_AsVal_int(argv[0], NULL);
26297 _v = SWIG_CheckState(res);
26300 return _wrap_new_CenteringTransform__SWIG_0(
self, args);
26305 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_CenteringTransform'.\n"
26306 " Possible C/C++ prototypes are:\n"
26307 " faiss::CenteringTransform::CenteringTransform(int)\n"
26308 " faiss::CenteringTransform::CenteringTransform()\n");
26313 SWIGINTERN PyObject *_wrap_CenteringTransform_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26314 PyObject *resultobj = 0;
26317 float *arg3 = (
float *) 0 ;
26324 PyObject * obj0 = 0 ;
26325 PyObject * obj1 = 0 ;
26326 PyObject * obj2 = 0 ;
26328 if (!PyArg_ParseTuple(args,(
char *)
"OOO:CenteringTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
26329 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, 0 | 0 );
26330 if (!SWIG_IsOK(res1)) {
26331 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CenteringTransform_train" "', argument " "1"" of type '" "faiss::CenteringTransform *""'");
26334 ecode2 = SWIG_AsVal_long(obj1, &val2);
26335 if (!SWIG_IsOK(ecode2)) {
26336 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CenteringTransform_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26339 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26340 if (!SWIG_IsOK(res3)) {
26341 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "CenteringTransform_train" "', argument " "3"" of type '" "float const *""'");
26343 arg3 =
reinterpret_cast< float *
>(argp3);
26345 Py_BEGIN_ALLOW_THREADS
26347 (arg1)->train(arg2,(
float const *)arg3);
26349 PyEval_RestoreThread(_save);
26351 if (PyErr_Occurred()) {
26354 PyErr_SetString(PyExc_RuntimeError, e.
what());
26358 Py_END_ALLOW_THREADS
26360 resultobj = SWIG_Py_Void();
26367 SWIGINTERN PyObject *_wrap_CenteringTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26368 PyObject *resultobj = 0;
26370 faiss::VectorTransform::idx_t arg2 ;
26371 float *arg3 = (
float *) 0 ;
26372 float *arg4 = (
float *) 0 ;
26381 PyObject * obj0 = 0 ;
26382 PyObject * obj1 = 0 ;
26383 PyObject * obj2 = 0 ;
26384 PyObject * obj3 = 0 ;
26386 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:CenteringTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26387 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, 0 | 0 );
26388 if (!SWIG_IsOK(res1)) {
26389 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CenteringTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::CenteringTransform const *""'");
26392 ecode2 = SWIG_AsVal_long(obj1, &val2);
26393 if (!SWIG_IsOK(ecode2)) {
26394 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CenteringTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26396 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
26397 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26398 if (!SWIG_IsOK(res3)) {
26399 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "CenteringTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
26401 arg3 =
reinterpret_cast< float *
>(argp3);
26402 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26403 if (!SWIG_IsOK(res4)) {
26404 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "CenteringTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
26406 arg4 =
reinterpret_cast< float *
>(argp4);
26408 Py_BEGIN_ALLOW_THREADS
26412 PyEval_RestoreThread(_save);
26414 if (PyErr_Occurred()) {
26417 PyErr_SetString(PyExc_RuntimeError, e.
what());
26421 Py_END_ALLOW_THREADS
26423 resultobj = SWIG_Py_Void();
26430 SWIGINTERN PyObject *_wrap_CenteringTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26431 PyObject *resultobj = 0;
26433 faiss::VectorTransform::idx_t arg2 ;
26434 float *arg3 = (
float *) 0 ;
26435 float *arg4 = (
float *) 0 ;
26444 PyObject * obj0 = 0 ;
26445 PyObject * obj1 = 0 ;
26446 PyObject * obj2 = 0 ;
26447 PyObject * obj3 = 0 ;
26449 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:CenteringTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26450 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, 0 | 0 );
26451 if (!SWIG_IsOK(res1)) {
26452 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "CenteringTransform_reverse_transform" "', argument " "1"" of type '" "faiss::CenteringTransform const *""'");
26455 ecode2 = SWIG_AsVal_long(obj1, &val2);
26456 if (!SWIG_IsOK(ecode2)) {
26457 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "CenteringTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26459 arg2 =
static_cast< faiss::VectorTransform::idx_t
>(val2);
26460 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26461 if (!SWIG_IsOK(res3)) {
26462 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "CenteringTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
26464 arg3 =
reinterpret_cast< float *
>(argp3);
26465 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26466 if (!SWIG_IsOK(res4)) {
26467 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "CenteringTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
26469 arg4 =
reinterpret_cast< float *
>(argp4);
26471 Py_BEGIN_ALLOW_THREADS
26475 PyEval_RestoreThread(_save);
26477 if (PyErr_Occurred()) {
26480 PyErr_SetString(PyExc_RuntimeError, e.
what());
26484 Py_END_ALLOW_THREADS
26486 resultobj = SWIG_Py_Void();
26493 SWIGINTERN PyObject *_wrap_delete_CenteringTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26494 PyObject *resultobj = 0;
26498 PyObject * obj0 = 0 ;
26500 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_CenteringTransform",&obj0)) SWIG_fail;
26501 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__CenteringTransform, SWIG_POINTER_DISOWN | 0 );
26502 if (!SWIG_IsOK(res1)) {
26503 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_CenteringTransform" "', argument " "1"" of type '" "faiss::CenteringTransform *""'");
26507 resultobj = SWIG_Py_Void();
26514 SWIGINTERN PyObject *CenteringTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26516 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
26517 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__CenteringTransform, SWIG_NewClientData(obj));
26518 return SWIG_Py_Void();
26521 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26522 PyObject *resultobj = 0;
26524 std::vector< faiss::VectorTransform * > *arg2 = (std::vector< faiss::VectorTransform * > *) 0 ;
26529 PyObject * obj0 = 0 ;
26530 PyObject * obj1 = 0 ;
26532 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexPreTransform_chain_set",&obj0,&obj1)) SWIG_fail;
26533 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26534 if (!SWIG_IsOK(res1)) {
26535 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_chain_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26538 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
26539 if (!SWIG_IsOK(res2)) {
26540 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IndexPreTransform_chain_set" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > *""'");
26542 arg2 =
reinterpret_cast< std::vector< faiss::VectorTransform * > *
>(argp2);
26543 if (arg1) (arg1)->chain = *arg2;
26544 resultobj = SWIG_Py_Void();
26551 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26552 PyObject *resultobj = 0;
26556 PyObject * obj0 = 0 ;
26557 std::vector< faiss::VectorTransform * > *result = 0 ;
26559 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexPreTransform_chain_get",&obj0)) SWIG_fail;
26560 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26561 if (!SWIG_IsOK(res1)) {
26562 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_chain_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26565 result = (std::vector< faiss::VectorTransform * > *)& ((arg1)->chain);
26566 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
26573 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26574 PyObject *resultobj = 0;
26581 PyObject * obj0 = 0 ;
26582 PyObject * obj1 = 0 ;
26584 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexPreTransform_index_set",&obj0,&obj1)) SWIG_fail;
26585 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26586 if (!SWIG_IsOK(res1)) {
26587 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_index_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26590 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
26591 if (!SWIG_IsOK(res2)) {
26592 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IndexPreTransform_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
26595 if (arg1) (arg1)->index = arg2;
26596 resultobj = SWIG_Py_Void();
26603 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26604 PyObject *resultobj = 0;
26608 PyObject * obj0 = 0 ;
26611 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexPreTransform_index_get",&obj0)) SWIG_fail;
26612 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26613 if (!SWIG_IsOK(res1)) {
26614 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_index_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26618 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
26625 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26626 PyObject *resultobj = 0;
26633 PyObject * obj0 = 0 ;
26634 PyObject * obj1 = 0 ;
26636 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexPreTransform_own_fields_set",&obj0,&obj1)) SWIG_fail;
26637 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26638 if (!SWIG_IsOK(res1)) {
26639 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_own_fields_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26642 ecode2 = SWIG_AsVal_bool(obj1, &val2);
26643 if (!SWIG_IsOK(ecode2)) {
26644 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_own_fields_set" "', argument " "2"" of type '" "bool""'");
26646 arg2 =
static_cast< bool >(val2);
26647 if (arg1) (arg1)->own_fields = arg2;
26648 resultobj = SWIG_Py_Void();
26655 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26656 PyObject *resultobj = 0;
26660 PyObject * obj0 = 0 ;
26663 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexPreTransform_own_fields_get",&obj0)) SWIG_fail;
26664 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26665 if (!SWIG_IsOK(res1)) {
26666 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_own_fields_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26669 result = (bool) ((arg1)->own_fields);
26670 resultobj = SWIG_From_bool(static_cast< bool >(result));
26677 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26678 PyObject *resultobj = 0;
26682 PyObject * obj0 = 0 ;
26685 if (!PyArg_ParseTuple(args,(
char *)
"O:new_IndexPreTransform",&obj0)) SWIG_fail;
26686 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
26687 if (!SWIG_IsOK(res1)) {
26688 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::Index *""'");
26692 Py_BEGIN_ALLOW_THREADS
26696 PyEval_RestoreThread(_save);
26698 if (PyErr_Occurred()) {
26701 PyErr_SetString(PyExc_RuntimeError, e.
what());
26705 Py_END_ALLOW_THREADS
26707 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26714 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26715 PyObject *resultobj = 0;
26718 if (!PyArg_ParseTuple(args,(
char *)
":new_IndexPreTransform")) SWIG_fail;
26720 Py_BEGIN_ALLOW_THREADS
26724 PyEval_RestoreThread(_save);
26726 if (PyErr_Occurred()) {
26729 PyErr_SetString(PyExc_RuntimeError, e.
what());
26733 Py_END_ALLOW_THREADS
26735 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26742 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26743 PyObject *resultobj = 0;
26750 PyObject * obj0 = 0 ;
26751 PyObject * obj1 = 0 ;
26754 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_IndexPreTransform",&obj0,&obj1)) SWIG_fail;
26755 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
26756 if (!SWIG_IsOK(res1)) {
26757 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
26760 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
26761 if (!SWIG_IsOK(res2)) {
26762 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "new_IndexPreTransform" "', argument " "2"" of type '" "faiss::Index *""'");
26766 Py_BEGIN_ALLOW_THREADS
26770 PyEval_RestoreThread(_save);
26772 if (PyErr_Occurred()) {
26775 PyErr_SetString(PyExc_RuntimeError, e.
what());
26779 Py_END_ALLOW_THREADS
26781 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26788 SWIGINTERN PyObject *_wrap_new_IndexPreTransform(PyObject *
self, PyObject *args) {
26790 PyObject *argv[3] = {
26795 if (!PyTuple_Check(args)) SWIG_fail;
26796 argc = args ? PyObject_Length(args) : 0;
26797 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
26798 argv[ii] = PyTuple_GET_ITEM(args,ii);
26801 return _wrap_new_IndexPreTransform__SWIG_1(
self, args);
26806 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
26807 _v = SWIG_CheckState(res);
26809 return _wrap_new_IndexPreTransform__SWIG_0(
self, args);
26815 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__VectorTransform, 0);
26816 _v = SWIG_CheckState(res);
26819 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
26820 _v = SWIG_CheckState(res);
26822 return _wrap_new_IndexPreTransform__SWIG_2(
self, args);
26828 SWIG_SetErrorMsg(PyExc_NotImplementedError,
"Wrong number or type of arguments for overloaded function 'new_IndexPreTransform'.\n"
26829 " Possible C/C++ prototypes are:\n"
26830 " faiss::IndexPreTransform::IndexPreTransform(faiss::Index *)\n"
26831 " faiss::IndexPreTransform::IndexPreTransform()\n"
26832 " faiss::IndexPreTransform::IndexPreTransform(faiss::VectorTransform *,faiss::Index *)\n");
26837 SWIGINTERN PyObject *_wrap_IndexPreTransform_prepend_transform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26838 PyObject *resultobj = 0;
26845 PyObject * obj0 = 0 ;
26846 PyObject * obj1 = 0 ;
26848 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexPreTransform_prepend_transform",&obj0,&obj1)) SWIG_fail;
26849 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26850 if (!SWIG_IsOK(res1)) {
26851 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_prepend_transform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26854 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
26855 if (!SWIG_IsOK(res2)) {
26856 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IndexPreTransform_prepend_transform" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
26860 Py_BEGIN_ALLOW_THREADS
26862 (arg1)->prepend_transform(arg2);
26864 PyEval_RestoreThread(_save);
26866 if (PyErr_Occurred()) {
26869 PyErr_SetString(PyExc_RuntimeError, e.
what());
26873 Py_END_ALLOW_THREADS
26875 resultobj = SWIG_Py_Void();
26882 SWIGINTERN PyObject *_wrap_IndexPreTransform_train(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26883 PyObject *resultobj = 0;
26886 float *arg3 = (
float *) 0 ;
26893 PyObject * obj0 = 0 ;
26894 PyObject * obj1 = 0 ;
26895 PyObject * obj2 = 0 ;
26897 if (!PyArg_ParseTuple(args,(
char *)
"OOO:IndexPreTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
26898 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26899 if (!SWIG_IsOK(res1)) {
26900 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_train" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26903 ecode2 = SWIG_AsVal_long(obj1, &val2);
26904 if (!SWIG_IsOK(ecode2)) {
26905 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26908 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26909 if (!SWIG_IsOK(res3)) {
26910 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_train" "', argument " "3"" of type '" "float const *""'");
26912 arg3 =
reinterpret_cast< float *
>(argp3);
26914 Py_BEGIN_ALLOW_THREADS
26916 (arg1)->train(arg2,(
float const *)arg3);
26918 PyEval_RestoreThread(_save);
26920 if (PyErr_Occurred()) {
26923 PyErr_SetString(PyExc_RuntimeError, e.
what());
26927 Py_END_ALLOW_THREADS
26929 resultobj = SWIG_Py_Void();
26936 SWIGINTERN PyObject *_wrap_IndexPreTransform_add(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26937 PyObject *resultobj = 0;
26940 float *arg3 = (
float *) 0 ;
26947 PyObject * obj0 = 0 ;
26948 PyObject * obj1 = 0 ;
26949 PyObject * obj2 = 0 ;
26951 if (!PyArg_ParseTuple(args,(
char *)
"OOO:IndexPreTransform_add",&obj0,&obj1,&obj2)) SWIG_fail;
26952 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26953 if (!SWIG_IsOK(res1)) {
26954 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_add" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26957 ecode2 = SWIG_AsVal_long(obj1, &val2);
26958 if (!SWIG_IsOK(ecode2)) {
26959 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26962 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26963 if (!SWIG_IsOK(res3)) {
26964 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_add" "', argument " "3"" of type '" "float const *""'");
26966 arg3 =
reinterpret_cast< float *
>(argp3);
26968 Py_BEGIN_ALLOW_THREADS
26970 (arg1)->add(arg2,(
float const *)arg3);
26972 PyEval_RestoreThread(_save);
26974 if (PyErr_Occurred()) {
26977 PyErr_SetString(PyExc_RuntimeError, e.
what());
26981 Py_END_ALLOW_THREADS
26983 resultobj = SWIG_Py_Void();
26990 SWIGINTERN PyObject *_wrap_IndexPreTransform_add_with_ids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
26991 PyObject *resultobj = 0;
26994 float *arg3 = (
float *) 0 ;
26995 long *arg4 = (
long *) 0 ;
27004 PyObject * obj0 = 0 ;
27005 PyObject * obj1 = 0 ;
27006 PyObject * obj2 = 0 ;
27007 PyObject * obj3 = 0 ;
27009 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:IndexPreTransform_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
27010 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27011 if (!SWIG_IsOK(res1)) {
27012 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_add_with_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
27015 ecode2 = SWIG_AsVal_long(obj1, &val2);
27016 if (!SWIG_IsOK(ecode2)) {
27017 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27020 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27021 if (!SWIG_IsOK(res3)) {
27022 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_add_with_ids" "', argument " "3"" of type '" "float const *""'");
27024 arg3 =
reinterpret_cast< float *
>(argp3);
27025 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
27026 if (!SWIG_IsOK(res4)) {
27027 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "IndexPreTransform_add_with_ids" "', argument " "4"" of type '" "long const *""'");
27029 arg4 =
reinterpret_cast< long *
>(argp4);
27031 Py_BEGIN_ALLOW_THREADS
27033 (arg1)->add_with_ids(arg2,(
float const *)arg3,(
long const *)arg4);
27035 PyEval_RestoreThread(_save);
27037 if (PyErr_Occurred()) {
27040 PyErr_SetString(PyExc_RuntimeError, e.
what());
27044 Py_END_ALLOW_THREADS
27046 resultobj = SWIG_Py_Void();
27053 SWIGINTERN PyObject *_wrap_IndexPreTransform_reset(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27054 PyObject *resultobj = 0;
27058 PyObject * obj0 = 0 ;
27060 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexPreTransform_reset",&obj0)) SWIG_fail;
27061 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27062 if (!SWIG_IsOK(res1)) {
27063 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_reset" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
27067 Py_BEGIN_ALLOW_THREADS
27071 PyEval_RestoreThread(_save);
27073 if (PyErr_Occurred()) {
27076 PyErr_SetString(PyExc_RuntimeError, e.
what());
27080 Py_END_ALLOW_THREADS
27082 resultobj = SWIG_Py_Void();
27089 SWIGINTERN PyObject *_wrap_IndexPreTransform_remove_ids(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27090 PyObject *resultobj = 0;
27097 PyObject * obj0 = 0 ;
27098 PyObject * obj1 = 0 ;
27101 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexPreTransform_remove_ids",&obj0,&obj1)) SWIG_fail;
27102 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27103 if (!SWIG_IsOK(res1)) {
27104 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_remove_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
27107 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
27108 if (!SWIG_IsOK(res2)) {
27109 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
27112 SWIG_exception_fail(SWIG_ValueError,
"invalid null reference " "in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
27116 Py_BEGIN_ALLOW_THREADS
27120 PyEval_RestoreThread(_save);
27122 if (PyErr_Occurred()) {
27125 PyErr_SetString(PyExc_RuntimeError, e.
what());
27129 Py_END_ALLOW_THREADS
27131 resultobj = SWIG_From_long(static_cast< long >(result));
27138 SWIGINTERN PyObject *_wrap_IndexPreTransform_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27139 PyObject *resultobj = 0;
27142 float *arg3 = (
float *) 0 ;
27144 float *arg5 = (
float *) 0 ;
27158 PyObject * obj0 = 0 ;
27159 PyObject * obj1 = 0 ;
27160 PyObject * obj2 = 0 ;
27161 PyObject * obj3 = 0 ;
27162 PyObject * obj4 = 0 ;
27163 PyObject * obj5 = 0 ;
27165 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:IndexPreTransform_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27166 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27167 if (!SWIG_IsOK(res1)) {
27168 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_search" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27171 ecode2 = SWIG_AsVal_long(obj1, &val2);
27172 if (!SWIG_IsOK(ecode2)) {
27173 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27176 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27177 if (!SWIG_IsOK(res3)) {
27178 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_search" "', argument " "3"" of type '" "float const *""'");
27180 arg3 =
reinterpret_cast< float *
>(argp3);
27181 ecode4 = SWIG_AsVal_long(obj3, &val4);
27182 if (!SWIG_IsOK(ecode4)) {
27183 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "IndexPreTransform_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27186 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27187 if (!SWIG_IsOK(res5)) {
27188 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "IndexPreTransform_search" "', argument " "5"" of type '" "float *""'");
27190 arg5 =
reinterpret_cast< float *
>(argp5);
27191 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27192 if (!SWIG_IsOK(res6)) {
27193 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "IndexPreTransform_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27197 Py_BEGIN_ALLOW_THREADS
27201 PyEval_RestoreThread(_save);
27203 if (PyErr_Occurred()) {
27206 PyErr_SetString(PyExc_RuntimeError, e.
what());
27210 Py_END_ALLOW_THREADS
27212 resultobj = SWIG_Py_Void();
27219 SWIGINTERN PyObject *_wrap_IndexPreTransform_range_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27220 PyObject *resultobj = 0;
27223 float *arg3 = (
float *) 0 ;
27236 PyObject * obj0 = 0 ;
27237 PyObject * obj1 = 0 ;
27238 PyObject * obj2 = 0 ;
27239 PyObject * obj3 = 0 ;
27240 PyObject * obj4 = 0 ;
27242 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:IndexPreTransform_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
27243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27244 if (!SWIG_IsOK(res1)) {
27245 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_range_search" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27248 ecode2 = SWIG_AsVal_long(obj1, &val2);
27249 if (!SWIG_IsOK(ecode2)) {
27250 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27253 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27254 if (!SWIG_IsOK(res3)) {
27255 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_range_search" "', argument " "3"" of type '" "float const *""'");
27257 arg3 =
reinterpret_cast< float *
>(argp3);
27258 ecode4 = SWIG_AsVal_float(obj3, &val4);
27259 if (!SWIG_IsOK(ecode4)) {
27260 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "IndexPreTransform_range_search" "', argument " "4"" of type '" "float""'");
27262 arg4 =
static_cast< float >(val4);
27263 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
27264 if (!SWIG_IsOK(res5)) {
27265 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "IndexPreTransform_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
27269 Py_BEGIN_ALLOW_THREADS
27273 PyEval_RestoreThread(_save);
27275 if (PyErr_Occurred()) {
27278 PyErr_SetString(PyExc_RuntimeError, e.
what());
27282 Py_END_ALLOW_THREADS
27284 resultobj = SWIG_Py_Void();
27291 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27292 PyObject *resultobj = 0;
27295 float *arg3 = (
float *) 0 ;
27302 PyObject * obj0 = 0 ;
27303 PyObject * obj1 = 0 ;
27304 PyObject * obj2 = 0 ;
27306 if (!PyArg_ParseTuple(args,(
char *)
"OOO:IndexPreTransform_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
27307 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27308 if (!SWIG_IsOK(res1)) {
27309 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27312 ecode2 = SWIG_AsVal_long(obj1, &val2);
27313 if (!SWIG_IsOK(ecode2)) {
27314 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27317 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27318 if (!SWIG_IsOK(res3)) {
27319 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_reconstruct" "', argument " "3"" of type '" "float *""'");
27321 arg3 =
reinterpret_cast< float *
>(argp3);
27323 Py_BEGIN_ALLOW_THREADS
27327 PyEval_RestoreThread(_save);
27329 if (PyErr_Occurred()) {
27332 PyErr_SetString(PyExc_RuntimeError, e.
what());
27336 Py_END_ALLOW_THREADS
27338 resultobj = SWIG_Py_Void();
27345 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct_n(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27346 PyObject *resultobj = 0;
27350 float *arg4 = (
float *) 0 ;
27359 PyObject * obj0 = 0 ;
27360 PyObject * obj1 = 0 ;
27361 PyObject * obj2 = 0 ;
27362 PyObject * obj3 = 0 ;
27364 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:IndexPreTransform_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
27365 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27366 if (!SWIG_IsOK(res1)) {
27367 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27370 ecode2 = SWIG_AsVal_long(obj1, &val2);
27371 if (!SWIG_IsOK(ecode2)) {
27372 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27375 ecode3 = SWIG_AsVal_long(obj2, &val3);
27376 if (!SWIG_IsOK(ecode3)) {
27377 SWIG_exception_fail(SWIG_ArgError(ecode3),
"in method '" "IndexPreTransform_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
27380 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
27381 if (!SWIG_IsOK(res4)) {
27382 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "IndexPreTransform_reconstruct_n" "', argument " "4"" of type '" "float *""'");
27384 arg4 =
reinterpret_cast< float *
>(argp4);
27386 Py_BEGIN_ALLOW_THREADS
27390 PyEval_RestoreThread(_save);
27392 if (PyErr_Occurred()) {
27395 PyErr_SetString(PyExc_RuntimeError, e.
what());
27399 Py_END_ALLOW_THREADS
27401 resultobj = SWIG_Py_Void();
27408 SWIGINTERN PyObject *_wrap_IndexPreTransform_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27409 PyObject *resultobj = 0;
27412 float *arg3 = (
float *) 0 ;
27414 float *arg5 = (
float *) 0 ;
27416 float *arg7 = (
float *) 0 ;
27431 PyObject * obj0 = 0 ;
27432 PyObject * obj1 = 0 ;
27433 PyObject * obj2 = 0 ;
27434 PyObject * obj3 = 0 ;
27435 PyObject * obj4 = 0 ;
27436 PyObject * obj5 = 0 ;
27437 PyObject * obj6 = 0 ;
27439 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOOO:IndexPreTransform_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
27440 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27441 if (!SWIG_IsOK(res1)) {
27442 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27445 ecode2 = SWIG_AsVal_long(obj1, &val2);
27446 if (!SWIG_IsOK(ecode2)) {
27447 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27450 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27451 if (!SWIG_IsOK(res3)) {
27452 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
27454 arg3 =
reinterpret_cast< float *
>(argp3);
27455 ecode4 = SWIG_AsVal_long(obj3, &val4);
27456 if (!SWIG_IsOK(ecode4)) {
27457 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27460 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27461 if (!SWIG_IsOK(res5)) {
27462 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
27464 arg5 =
reinterpret_cast< float *
>(argp5);
27465 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27466 if (!SWIG_IsOK(res6)) {
27467 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27470 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
27471 if (!SWIG_IsOK(res7)) {
27472 SWIG_exception_fail(SWIG_ArgError(res7),
"in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
27474 arg7 =
reinterpret_cast< float *
>(argp7);
27476 Py_BEGIN_ALLOW_THREADS
27480 PyEval_RestoreThread(_save);
27482 if (PyErr_Occurred()) {
27485 PyErr_SetString(PyExc_RuntimeError, e.
what());
27489 Py_END_ALLOW_THREADS
27491 resultobj = SWIG_Py_Void();
27498 SWIGINTERN PyObject *_wrap_IndexPreTransform_apply_chain(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27499 PyObject *resultobj = 0;
27502 float *arg3 = (
float *) 0 ;
27509 PyObject * obj0 = 0 ;
27510 PyObject * obj1 = 0 ;
27511 PyObject * obj2 = 0 ;
27512 float *result = 0 ;
27514 if (!PyArg_ParseTuple(args,(
char *)
"OOO:IndexPreTransform_apply_chain",&obj0,&obj1,&obj2)) SWIG_fail;
27515 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27516 if (!SWIG_IsOK(res1)) {
27517 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_apply_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27520 ecode2 = SWIG_AsVal_long(obj1, &val2);
27521 if (!SWIG_IsOK(ecode2)) {
27522 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_apply_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27525 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27526 if (!SWIG_IsOK(res3)) {
27527 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_apply_chain" "', argument " "3"" of type '" "float const *""'");
27529 arg3 =
reinterpret_cast< float *
>(argp3);
27531 Py_BEGIN_ALLOW_THREADS
27535 PyEval_RestoreThread(_save);
27537 if (PyErr_Occurred()) {
27540 PyErr_SetString(PyExc_RuntimeError, e.
what());
27544 Py_END_ALLOW_THREADS
27546 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
27553 SWIGINTERN PyObject *_wrap_IndexPreTransform_reverse_chain(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27554 PyObject *resultobj = 0;
27557 float *arg3 = (
float *) 0 ;
27558 float *arg4 = (
float *) 0 ;
27567 PyObject * obj0 = 0 ;
27568 PyObject * obj1 = 0 ;
27569 PyObject * obj2 = 0 ;
27570 PyObject * obj3 = 0 ;
27572 if (!PyArg_ParseTuple(args,(
char *)
"OOOO:IndexPreTransform_reverse_chain",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
27573 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27574 if (!SWIG_IsOK(res1)) {
27575 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexPreTransform_reverse_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27578 ecode2 = SWIG_AsVal_long(obj1, &val2);
27579 if (!SWIG_IsOK(ecode2)) {
27580 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexPreTransform_reverse_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27583 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27584 if (!SWIG_IsOK(res3)) {
27585 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexPreTransform_reverse_chain" "', argument " "3"" of type '" "float const *""'");
27587 arg3 =
reinterpret_cast< float *
>(argp3);
27588 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
27589 if (!SWIG_IsOK(res4)) {
27590 SWIG_exception_fail(SWIG_ArgError(res4),
"in method '" "IndexPreTransform_reverse_chain" "', argument " "4"" of type '" "float *""'");
27592 arg4 =
reinterpret_cast< float *
>(argp4);
27594 Py_BEGIN_ALLOW_THREADS
27598 PyEval_RestoreThread(_save);
27600 if (PyErr_Occurred()) {
27603 PyErr_SetString(PyExc_RuntimeError, e.
what());
27607 Py_END_ALLOW_THREADS
27609 resultobj = SWIG_Py_Void();
27616 SWIGINTERN PyObject *_wrap_delete_IndexPreTransform(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27617 PyObject *resultobj = 0;
27621 PyObject * obj0 = 0 ;
27623 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_IndexPreTransform",&obj0)) SWIG_fail;
27624 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_DISOWN | 0 );
27625 if (!SWIG_IsOK(res1)) {
27626 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_IndexPreTransform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
27630 Py_BEGIN_ALLOW_THREADS
27634 PyEval_RestoreThread(_save);
27636 if (PyErr_Occurred()) {
27639 PyErr_SetString(PyExc_RuntimeError, e.
what());
27643 Py_END_ALLOW_THREADS
27645 resultobj = SWIG_Py_Void();
27652 SWIGINTERN PyObject *IndexPreTransform_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27654 if (!PyArg_ParseTuple(args,(
char *)
"O:swigregister", &obj))
return NULL;
27655 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPreTransform, SWIG_NewClientData(obj));
27656 return SWIG_Py_Void();
27659 SWIGINTERN PyObject *_wrap_IndexFlat_xb_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27660 PyObject *resultobj = 0;
27662 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
27667 PyObject * obj0 = 0 ;
27668 PyObject * obj1 = 0 ;
27670 if (!PyArg_ParseTuple(args,(
char *)
"OO:IndexFlat_xb_set",&obj0,&obj1)) SWIG_fail;
27671 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27672 if (!SWIG_IsOK(res1)) {
27673 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_xb_set" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27676 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
27677 if (!SWIG_IsOK(res2)) {
27678 SWIG_exception_fail(SWIG_ArgError(res2),
"in method '" "IndexFlat_xb_set" "', argument " "2"" of type '" "std::vector< float > *""'");
27680 arg2 =
reinterpret_cast< std::vector< float > *
>(argp2);
27681 if (arg1) (arg1)->xb = *arg2;
27682 resultobj = SWIG_Py_Void();
27689 SWIGINTERN PyObject *_wrap_IndexFlat_xb_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27690 PyObject *resultobj = 0;
27694 PyObject * obj0 = 0 ;
27695 std::vector< float > *result = 0 ;
27697 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexFlat_xb_get",&obj0)) SWIG_fail;
27698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27699 if (!SWIG_IsOK(res1)) {
27700 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_xb_get" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27703 result = (std::vector< float > *)& ((arg1)->xb);
27704 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
27711 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27712 PyObject *resultobj = 0;
27719 PyObject * obj0 = 0 ;
27720 PyObject * obj1 = 0 ;
27723 if (!PyArg_ParseTuple(args,(
char *)
"OO:new_IndexFlat",&obj0,&obj1)) SWIG_fail;
27724 ecode1 = SWIG_AsVal_long(obj0, &val1);
27725 if (!SWIG_IsOK(ecode1)) {
27726 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27729 ecode2 = SWIG_AsVal_int(obj1, &val2);
27730 if (!SWIG_IsOK(ecode2)) {
27731 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "new_IndexFlat" "', argument " "2"" of type '" "faiss::MetricType""'");
27735 Py_BEGIN_ALLOW_THREADS
27739 PyEval_RestoreThread(_save);
27741 if (PyErr_Occurred()) {
27744 PyErr_SetString(PyExc_RuntimeError, e.
what());
27748 Py_END_ALLOW_THREADS
27750 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
27757 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27758 PyObject *resultobj = 0;
27762 PyObject * obj0 = 0 ;
27765 if (!PyArg_ParseTuple(args,(
char *)
"O:new_IndexFlat",&obj0)) SWIG_fail;
27766 ecode1 = SWIG_AsVal_long(obj0, &val1);
27767 if (!SWIG_IsOK(ecode1)) {
27768 SWIG_exception_fail(SWIG_ArgError(ecode1),
"in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27772 Py_BEGIN_ALLOW_THREADS
27776 PyEval_RestoreThread(_save);
27778 if (PyErr_Occurred()) {
27781 PyErr_SetString(PyExc_RuntimeError, e.
what());
27785 Py_END_ALLOW_THREADS
27787 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
27794 SWIGINTERN PyObject *_wrap_IndexFlat_add(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27795 PyObject *resultobj = 0;
27798 float *arg3 = (
float *) 0 ;
27805 PyObject * obj0 = 0 ;
27806 PyObject * obj1 = 0 ;
27807 PyObject * obj2 = 0 ;
27809 if (!PyArg_ParseTuple(args,(
char *)
"OOO:IndexFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
27810 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27811 if (!SWIG_IsOK(res1)) {
27812 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_add" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27815 ecode2 = SWIG_AsVal_long(obj1, &val2);
27816 if (!SWIG_IsOK(ecode2)) {
27817 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27820 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27821 if (!SWIG_IsOK(res3)) {
27822 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexFlat_add" "', argument " "3"" of type '" "float const *""'");
27824 arg3 =
reinterpret_cast< float *
>(argp3);
27826 Py_BEGIN_ALLOW_THREADS
27828 (arg1)->add(arg2,(
float const *)arg3);
27830 PyEval_RestoreThread(_save);
27832 if (PyErr_Occurred()) {
27835 PyErr_SetString(PyExc_RuntimeError, e.
what());
27839 Py_END_ALLOW_THREADS
27841 resultobj = SWIG_Py_Void();
27848 SWIGINTERN PyObject *_wrap_IndexFlat_reset(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27849 PyObject *resultobj = 0;
27853 PyObject * obj0 = 0 ;
27855 if (!PyArg_ParseTuple(args,(
char *)
"O:IndexFlat_reset",&obj0)) SWIG_fail;
27856 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27857 if (!SWIG_IsOK(res1)) {
27858 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_reset" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27862 Py_BEGIN_ALLOW_THREADS
27866 PyEval_RestoreThread(_save);
27868 if (PyErr_Occurred()) {
27871 PyErr_SetString(PyExc_RuntimeError, e.
what());
27875 Py_END_ALLOW_THREADS
27877 resultobj = SWIG_Py_Void();
27884 SWIGINTERN PyObject *_wrap_IndexFlat_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27885 PyObject *resultobj = 0;
27888 float *arg3 = (
float *) 0 ;
27890 float *arg5 = (
float *) 0 ;
27904 PyObject * obj0 = 0 ;
27905 PyObject * obj1 = 0 ;
27906 PyObject * obj2 = 0 ;
27907 PyObject * obj3 = 0 ;
27908 PyObject * obj4 = 0 ;
27909 PyObject * obj5 = 0 ;
27911 if (!PyArg_ParseTuple(args,(
char *)
"OOOOOO:IndexFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27912 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27913 if (!SWIG_IsOK(res1)) {
27914 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27917 ecode2 = SWIG_AsVal_long(obj1, &val2);
27918 if (!SWIG_IsOK(ecode2)) {
27919 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27922 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27923 if (!SWIG_IsOK(res3)) {
27924 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexFlat_search" "', argument " "3"" of type '" "float const *""'");
27926 arg3 =
reinterpret_cast< float *
>(argp3);
27927 ecode4 = SWIG_AsVal_long(obj3, &val4);
27928 if (!SWIG_IsOK(ecode4)) {
27929 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "IndexFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27932 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27933 if (!SWIG_IsOK(res5)) {
27934 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "IndexFlat_search" "', argument " "5"" of type '" "float *""'");
27936 arg5 =
reinterpret_cast< float *
>(argp5);
27937 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27938 if (!SWIG_IsOK(res6)) {
27939 SWIG_exception_fail(SWIG_ArgError(res6),
"in method '" "IndexFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27943 Py_BEGIN_ALLOW_THREADS
27945 ((
faiss::IndexFlat const *)arg1)->search(arg2,(
float const *)arg3,arg4,arg5,arg6);
27947 PyEval_RestoreThread(_save);
27949 if (PyErr_Occurred()) {
27952 PyErr_SetString(PyExc_RuntimeError, e.
what());
27956 Py_END_ALLOW_THREADS
27958 resultobj = SWIG_Py_Void();
27965 SWIGINTERN PyObject *_wrap_IndexFlat_range_search(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
27966 PyObject *resultobj = 0;
27969 float *arg3 = (
float *) 0 ;
27982 PyObject * obj0 = 0 ;
27983 PyObject * obj1 = 0 ;
27984 PyObject * obj2 = 0 ;
27985 PyObject * obj3 = 0 ;
27986 PyObject * obj4 = 0 ;
27988 if (!PyArg_ParseTuple(args,(
char *)
"OOOOO:IndexFlat_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
27989 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27990 if (!SWIG_IsOK(res1)) {
27991 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "IndexFlat_range_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27994 ecode2 = SWIG_AsVal_long(obj1, &val2);
27995 if (!SWIG_IsOK(ecode2)) {
27996 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "IndexFlat_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27999 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28000 if (!SWIG_IsOK(res3)) {
28001 SWIG_exception_fail(SWIG_ArgError(res3),
"in method '" "IndexFlat_range_search" "', argument " "3"" of type '" "float const *""'");
28003 arg3 =
reinterpret_cast< float *
>(argp3);
28004 ecode4 = SWIG_AsVal_float(obj3, &val4);
28005 if (!SWIG_IsOK(ecode4)) {
28006 SWIG_exception_fail(SWIG_ArgError(ecode4),
"in method '" "IndexFlat_range_search" "', argument " "4"" of type '" "float""'");
28008 arg4 =
static_cast< float >(val4);
28009 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
28010 if (!SWIG_IsOK(res5)) {
28011 SWIG_exception_fail(SWIG_ArgError(res5),
"in method '" "IndexFlat_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
28015 Py_BEGIN_ALLOW_THREADS
28017 ((
faiss::IndexFlat const *)arg1)->range_search(arg2,(
float const *)arg3,arg4,arg5);
28019 PyEval_RestoreThread(_save);
28021 if (PyErr_Occurred()) {